Visualstudio: Failed sync due to login error

Created on 13 Mar 2018  路  16Comments  路  Source: github/VisualStudio

Sync operation fails with error message:

Error encountered while pushing to the remote repository: Git failed with a fatal error.
fatal: HttpRequestException encountered.
An error occurred while sending the request.
error: cannot spawn askpass: No such file or directory
fatal: could not read Username for 'https://github.com': terminal prompts disabled

  • GitHub Extension for Visual Studio version: 2.4.3.1737
  • Visual Studio version: 2017 Community

__What happened__ (with steps, logs and screenshots, if possible)

  1. Attempt Sync operation
  2. Be prompted for GitHub credentials
    login window
  3. Enter credentials and hit "Enter"
  4. Receive error message
    team explorer error
    output error
  5. Status of sync operation seems to have completed, but not sure.

Logs

Most helpful comment

The fix is in another thread I found. https://developercommunity.visualstudio.com/comments/310236/view.html

Since it's hidden by default, the text of the comment is below.

Mark Stafford Cory Plock 路 6 days ago 2 Reply Share

Hey Cory, funny seeing you here. I was having the same trouble with the TCI project. I downloaded the following zip:

https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/download/v1.17.1/gcmw-v1.17.1.zip

And extracted it to:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\libexec\git-core

I then restarted VS 2017. That worked for me. I initially tried the installer but that did not work.

NOTE: The path to extract the files to depends on the edition ot VS you have. Replace "Enterprise" with "Professional" if you have VS Professional (or use Windows Explorer to walk down the path like I did).

All 16 comments

Hi @IvanStoychev, a couple weeks ago GitHub turned off support for TLSv1 and 1.1. To fix this issue update your Visual Studio to 15.5.7 or later.

Many users have reported this issue here

Yes, you're right Meaghan. Upgrading my VS2017 installation with the latest patches 15.7.6 did fix it!

I have installed 15.8.0 of Visual Studio but still see the same issue. Any help?

I am also being impacted with this after upgrading to 15.8.0

The fix is in another thread I found. https://developercommunity.visualstudio.com/comments/310236/view.html

Since it's hidden by default, the text of the comment is below.

Mark Stafford Cory Plock 路 6 days ago 2 Reply Share

Hey Cory, funny seeing you here. I was having the same trouble with the TCI project. I downloaded the following zip:

https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/download/v1.17.1/gcmw-v1.17.1.zip

And extracted it to:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\libexec\git-core

I then restarted VS 2017. That worked for me. I initially tried the installer but that did not work.

NOTE: The path to extract the files to depends on the edition ot VS you have. Replace "Enterprise" with "Professional" if you have VS Professional (or use Windows Explorer to walk down the path like I did).

That worked for me too, thanks a lot!

Thanks JT3! I was having the same problem and your solution worked perfectly.

Thanks for the reports everyone. This does seem to be the same problem as #949 and that issue both has more comments so if you could post there if you have any more solutions or problems - representatives from Microsoft are on that issue trying to diagnose the problem

worked for me too

@JT3 Thanks. This worked for me also.

Applied the above fix to the location below and got this new issue:

An error occurred while sending the request.
cannot spawn /c/program files (x86)/microsoft visual studio/2017/professional/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory

Then followed this link and ran this command and it all seemed to work:

https://developercommunity.visualstudio.com/content/problem/176703/git-cannot-spawn-askpass-no-such-file-or-directory.html?childToView=310236#comment-310236

git config --global credential.helper wincred

Hope it helps someone else and thanks to all

Thanks isdsava, just fixed my issue too !

Thanks isdsava!! You ended my frustration!! :)

Thanks, it worked for me too.

Thanks, it worked for me too.

Thanks, This worked for me.

Was this page helpful?
0 / 5 - 0 ratings