Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Pull/Fetch using VS Team Explorer(Bitbucket git)

I am getting an error in my VS 2017 Team Explorer whenever I pull/fetch or push.

Git failed with a fatal error.
HttpRequestException encountered.
   An error occurred while sending the request.
cannot spawn /C/Program Files/Git/mingw64/libexec/git-core/git-askpass.exe: No error
could not read Password for 'https://<myusername>@bitbucket.org': terminal prompts disabled.

I tried to set my password by indicating:

https://<myusername>:<mypassword>@bitbucket.org

Still not fixed. But when I used SourceTree, it is fine.

How can I fix this so I can able to use VS Team Explorer again for pull/push?

I am using the following:

  • VS 2017 Community 15.7.6
  • Git version 2.18.0
  • Bitbucket

Thanks in advance.

like image 980
Jeric Cruz Avatar asked Aug 07 '18 13:08

Jeric Cruz


3 Answers

Same here, I do believe it's from bitbucket side.

the following worked for us :

Remove git related Credentials stored in Windows Credentials in >>Control Panel\All Control Panel Items\Credential Manager

link to SO here

then use this command :

git remote set-url origin https://name:[email protected]/repo.git

here is the source for this one

like image 155
dafriskymonkey Avatar answered Nov 20 '22 03:11

dafriskymonkey


There is a problem in Git for Windows and Microsoft is monitoring the solution to release a new version of VS with the patch.

https://developercommunity.visualstudio.com/content/problem/266473/sync-commit-git-failed-with-a-fatal-error.html

----- Finally I resolved with these steps --------------

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 asks for the BitBucket credential insert them

Only these sequence worked for me.

like image 5
robob Avatar answered Nov 20 '22 03:11

robob


Bitbucket's Authenticator is currenty failing. There is an open issue about it. https://bitbucket.org/site/master/issues/16892/cannot-fetch-or-push-using-visual-studio

If you can take the risk of pure username:password format using for temporarily, it will solve the problem.

like image 2
Ongun23 Avatar answered Nov 20 '22 04:11

Ongun23