Authentication failed for https://xxx.visualstudio.com/DefaultCollection/_git/project

GurdeepS picture GurdeepS · Mar 7, 2016 · Viewed 188k times · Source

I am trying to use git to push my repository to a visual studio team services project, but I get the error:

fatal: Authentication failed for (url of team project)

I am using the commands:

git remote add origin
     https://XXXXXXX.visualstudio.com/DefaultCollection/_git/project

git push -u origin -–all

Any idea of the fix for this?

Answer

kxiaocai picture kxiaocai · Aug 10, 2018

I had a same issue recently (visual studio 2017 & Windows 10), and solved it using the following method:

Control Panel --> Credential Manager --> Manage Windows Credentials --> Choose the entry of the git repository, and Edit the user and password.

Done.