2
votes

I am currently getting this error whilst pushing a GIT commit on Visual Studio 2017.

Error: 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 Error encountered while pushing to the remote repository: Git failed with a fatal error. could not read Username for 'https://**********.visualstudio.com': terminal prompts disabled Pushing to https://**********.visualstudio.com/projectlocationhere

Before this error happens I get a pop-up box asking me to put in my username and password, then it stalls and the error message appears.

I was getting this error previously, I scoured the internet end to end trying to find a fix, I changed all the git settings, reinstalled GIT, 'repaired' the visual studio installation. At the same time GIT is working fine fine on VS2015. The only thing that fixed this in the end was re-installing VS2017.

I believe that this is entirely down to Visual Studio 2017 and not GIT, this error appeared again straight after I updated Visual Studio to the latest version. I am now looking for a solution to this issue that doesn't involve reinstalling Visual Studio every time I want the latest update.

I suspect that it has something to do with access tokens? I removed the credential from credential manager but it hasn't prompted me for a new one.

1

1 Answers

4
votes

I have managed to get it working again.

I created a new Personal Access Token in Visual Studio Online and added this to windows credential manager.

and then in my c:/users/USERNAME/.gitconfig I changed the helper to:

[credential]
    helper = wincred

It seems to be working for now, hopefully if this happens again this will fix it, if not I will update this answer if no one else finds it first.