Git-credential-manager-for-windows: HttpRequestException and then I'm prompted for username

Created on 22 Feb 2018  路  19Comments  路  Source: microsoft/Git-Credential-Manager-for-Windows

I had this project working, then I moved a different project from gitlab to github, changed origins, and started getting prompted for User and password everytime now on the project that was working.

This is what I'm getting

git pull
fatal: HttpRequestException encountered.
    An error occurred while sending the request.

Unhandled Exception: System.ObjectDisposedException: Cannot access a closed file.
at System.IO.__Error.FileNotOpen()
at System.IO.FileStream.Flush(Boolean flushToDisk)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at Microsoft.Alm.Git.Trace.Microsoft.Alm.Git.ITrace.Flush()
at Microsoft.Alm.Cli.Program.Die(String message)
at Microsoft.Alm.Cli.Program.Die(Exception exception)
at Microsoft.Alm.Cli.Program.Main(String[] args)

Most helpful comment

@iagowp VSCode should be using Git for Windows, so can you update your Git for Windows install (which contains GCM) to the latest version here?

All 19 comments

@iagowp which version of GCM are you using?

Same exception here. We're using Visual Studio Community Edition and GitHub Extension for Visual Studio (version 2.4.2.1331). Everything has worked flawlessly for a year or more and we've done nothing different. Within the last hour, everyone on our team has experienced the same issue when we try to sync (and we're in different geographical locations...all with same issue). The detail from the VS2017 output window says:

Opening repositories:
C:\ClientProjects\XYZCorp\Xyz\Xyz.ServerCore
Git failed with a fatal error.
HttpRequestException encountered.
An error occurred while sending the request.
cannot spawn askpass: No such file or directory
could not read Username for 'https://github.com': terminal prompts disabled

We've googled and found that others have experienced this within the last hour and within the last day or so. Any help or direction is greatly appreciated.

@CAGittyUp updates for Visual Studio went out over the last couple of days containing a new version of GCM to speak TLS 1.2. Please update Visual Studio to the latest version and try again.

Hi jrbriggs,

Thanks for the quick response. I do see an update for Visual Studio 2017 update version 15.5.7. I assume that's what you're referring to and will do so right now and let you know of our results.

I am using the latest version of VS and getting the error.

@CAGittyUp yes, it's 15.5.7 that you want.

@MarvinThompson which version is shown in the about dialog?

15.5.7

All the members of my team are having the same issue.

@shiftkey How do I know which version?

I use VSCode 1.20.1

Hi John,

That was it (updating to 15.5.7 of Visual Studio)! Two of us, so far, have updated and it now works for both (we're in different cities).

You've saved me time and time is money. If we can shift to a different channel, I'd sure like to put some coffee in your cup. Thanks again.

@iagowp VSCode should be using Git for Windows, so can you update your Git for Windows install (which contains GCM) to the latest version here?

Looks like I'm getting the same issue trying to pull through Visual Studio version 15.3.5 and when I tried to pull through command line.

Updated to git 2.16.2 No help

@MarvinThompson please open a fresh issue and provide details about the precise error you're encountering, as well as enough details to reproduce the issue

Updating Git worked. Thanks @shiftkey

@iagowp I'm glad you were able to get back to a happy place!

Same issue here, VS 2017 15.5.7, TortoiseGit 2.6, Windows 10 64bits.
Updating Git (https://git-scm.com/download/win) to version 2.16.2 solved the issue.
Just my two cents.

Thanks!

All, the issue is that GitHub rolled out TLS 1.2 as a requirement today. The GCM was updated to meet the requirement as of v1.14.0 (Git for Windows v2.16.2 or better). Updating either ought to resolve the issue.

Thanks for reporting the issue. 馃槂

Was this page helpful?
0 / 5 - 0 ratings