Cannot fetch or push using visual studio

Issue #16892 resolved
Charlie created an issue

cannot spawn /C/Program Files/Git/mingw64/libexec/git-core/git-askpass.exe: No error
could not read Password for : terminal prompts disabled

reinstalled the latest versions of Git for Windows and Git Credential manager with the same result

Official response

Comments (48)

  1. Tyler Long

    Having similar issues through git terminal and through VS:

    Git failed with a fatal error.
    HttpRequestException encountered.
       An error occurred while sending the request.
    HttpRequestException encountered.
       An error occurred while sending the request.
    cannot spawn /C/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory
    
  2. Siebren Kwekkeboom

    Got the same issue, tried re-installing git, removing the credential from the windows Credential Manager. No luck.

  3. Nathan Edminster

    Starting today, our team is experiencing the same issue as @Tyler Long - updated to VS 15.7.6 and still getting the error.

  4. Giuseppe Briotti

    It works to me until yesterday. Sync performed last friday (3rd august), then updated to 15.7.6. Sync performed yesterday successfull with 15.7.6.

    Noway today 7th august.

    Not sure it is depending on VS version...

  5. Tyler Long

    @gbriotti, Similar time window for me on failures. My last successful sync was Friday the 3rd also, today is the first failure noticed. While I'm also using v15.7.6 of VS, I doubt this is isolated to VS as I'm also seeing similar issues through git on the command line (git for windows v2.18.0):

    fatal: HttpRequestException encountered.
       An error occurred while sending the request.
    fatal: HttpRequestException encountered.
       An error occurred while sending the request.
    
  6. Christopher Kelly

    This has just bit me as well, we have a blocking issue on our app and I can't push a fix!!

  7. Giuseppe Briotti

    @wesleywarren this works for me depending on plugin installed. With Bitbuckett extension it seems to work (I was able to clone a repository), with Easy GIT plugin removing the GIT folder simply remove the repository association... good hint anyway.

  8. Ewart MacLucas

    for ***ks sake none of the above fixes worked for me. plus re-downloading repairing VS 2017 1.5 gigabytes of wasted data and time later still no joy. what the hell. is the solution to just use another product other than MS visual studio??

  9. roberto battistoni

    @HeorhiOkau it does not work for me! After installing the package, VS asked me for the credentials on BitBucket but it didn't accept them. So I renamed the Git directory inside "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer" and then IT WORKED.

  10. Joe Holub

    With me this is a problem with VStudio, and started with the last update. Git from the command line works exactly as it should.

  11. roberto battistoni

    The solution for me on Windows 7 and Windows 10 is this:

    1) delete credentials in the Credential Manager

    2) rename or delete the Git directory in "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer"

    3) install the package "https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.17.0"

    4) when VS ask for the BitBucket credential insert them

    Only these sequence worked for me.

  12. Joe Holub

    @roberto battistoni

    Did not work for me. Only thing that changed was that the error message changed to : No error (from No such file or directory)

    FYI -On my system the new credential manager package looks exactly the same as the one it replaced.

    Now doing a yet another repair to see if that makes a diff.

  13. Joe Holub

    Repair did nothing.

    Did a manual git push from the command line, got the authenticator pop up. but this failed and I had to enter the password on the command line. Then the push worked.

    So who owns the authentication pop up process? That's outside of VStudio.

  14. Chris Roberts

    This is not related to 15.7.6. I'm still on .5 and having the same issue, as are other developers in the office. I also have the same command line symptoms as Joe. It seems to be a change at Bitbucket's end.

  15. Joe Holub

    My money is on the Git Credential Manager. Trying to figure out how to uninstall it so that I can revert to an older version to confirm. Don't think it either Git For Windows or bitbucket, both work fine for me
    .

  16. Giuseppe Briotti

    @joeholub check the credential manager again. I followed the steps posted by Roberto Battistoni and ends with different error message. Control Panel -> Credentials Manager and discovered that the user name was totally wrong. Changed it to the correct one ed everything goes fine.

    So, the final sequence is:

    1) delete credentials in the Credential Manager

    2) rename or delete the Git directory in "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer"

    3) install the package "https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.17.0"

    4) when VS ask for the BitBucket credential insert them

    5) if still not work, check the newly created credentials and modify the user name

  17. Joe Holub

    @giuseppebriotti - done that a couple of times now. found this in the event log - "Failed to retrieve Bitbucket credentials for 'https://xxxxxxx@bitbucket.org/'." so guess it's something to do with git-askpass.exe as command line without the credential manager works ok.

    I'll set up an ssh key as suggested in AmosHason's link and see how that goes...

    [edit for clarity]

  18. Giuseppe Briotti

    Same message for me... I solved with all the steps above on Win7, VS Community 15.7.6 and EH Git plugin.
    Step from 1 to 2 solved the problem on Win7, VS Community 15.7.6 and BitBuckett plugin for VS.

    Quite strange...

  19. Joe Holub

    I have SSH configured on one computer, and is working fine for terminal and VS. Not able to get multiple keys working yet.

  20. Tyler Long

    @jaciechowski Updating GCM to v1.17 was the key that got all back working for me; that and renaming the Git folder in the VS path. #worksonmymachine

  21. Ainsley

    Giuseppe Briotti, your update to your solution where you double check the Credential Manager (Step 5) after finishing all the previous steps worked for me!
    My user name inside the Credential Manager was set to something weird.

    Anyway, excellent solution! Back to work for me!

  22. Jason Feyers

    I followed the steps that Giuseppe Briotti mentioned...still didn't work. I edited my Credential in the WIndows Credential Manager and noticed the username was not right. So I changed it to the email address I use to login to Atlassian tools and tried again. It worked. So my username@bitbucket.org contains a username that is not what I use to login..I use my email as my login.

  23. Cristian Jara

    "Wesley Warren
    This fix worked for my team in Team Explorer.

    Close VS
    Delete folder "C:\Program Files (x86)\Microsoft Visual Studio\2017{Community|Professional|Enterprise}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git"
    Open VS and try to push a commit to a remote repo! [or fetch]"

    Work for me!.

  24. Dan Soltesz

    I updated git credential manager so now with bitbucket extension I got prompted for user and pass when trying to clone but it keeps failing and doesn’t sign in though I can sign into the extension and the website.

  25. Dan Soltesz

    I tried that victor..still get the same prompt for my credentials which it asks for me twice and then fails Git failed with a fatal error.
    could not read Password for 'https://xxx@bitbucket.org': terminal prompts disabled

  26. Ainsley

    Dan, have you tried looking for your bitbucket info in your Windows Credential Manager? When I followed these steps, it set my user name so something weird and when I changed it back it began to work again.

  27. mireiner

    The solution from Stackoverflow Victor Bibawi posted worked for me. Thank you Victor!

    https://stackoverflow.com/questions/51725278/extension-for-visual-studio-unknown-error-unable-to-push-or-fetch-anything/51746323#51746323

    After that delete the Bitbucket entry in Windows Credential Manager and then change the Bitbucket Git login scheme in Visual Studio to:

    URL: https://bitbucket.org/your-username/your-repository.git

    Login: your-email

    Pass: your-password

    (I don't use the Visual Studio Bitbucket extension).

  28. Michael Ekstrand

    I am experiencing this problem without Visual Studio - Git 2.18.0 installed via Scoop, run on the command line.

  29. Pieter van Kampen

    I have the same issue. I tried the solution as described by @mireiner, but that does not persist. I can stop it for a while by going to the repository directory in a command prompt and entering:

    git config --global credential.helper wincred

    I need to do this while already on the Syncronization tab in the Team Explorer

    Than I can sync, but the next time I go to the sync screen I have to do this again.

    I am using the latest Visual Studio and have now upgraded to the latest BitBucket extension. Not sure if this changed, the syncs go through but the bitbucket screen appears when I have not given the command above. I am not sure this is temporarily though, I have noticed before that many solutions only work a while. The command above at least works consistently.

  30. Dan Soltesz

    Ainsley, my username looked correct in Credential Manager..still just get the prompt to login when i try to do any git operation from inside visual studio but it never accepts the password and ultimately gives Git failed with a fatal error.
    could not read Password for 'https://xxx@bitbucket.org': terminal prompts disabled

  31. D

    @Wesley Warren: Deleting C:\Program Files (x86)\Microsoft Visual Studio\2017{Community|Professional|Enterprise}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git" means that File/Add to source control in VS doesn't work anymore. It will just do nothing and the option remains visible in the File menu.
    What solved it for me is what I found on https://developercommunity.visualstudio.com/content/problem/4833/git-failed-with-a-fatal-error.html: J Wyman wrote:

    Several users confirmed that copying the binaries from the "<VS_INSTALL>\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin\" folder to the "<VS_INSTALL>\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\libexec\git-core\" folder completely resolved the issue for him.
    And indeed, I had to login again for Bitbucket and afterwards it pushed my changes.

    Dick

  32. Log in to comment