Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 989
GurdeepS Avatar asked Mar 06 '16 23:03

GurdeepS


People also ask

How do I update my Git credentials in Visual Studio?

From the Git menu, go to Settings. To set your user name and email at the global level, go to Git Global Settings; to set your user name and email at the repository level, go to Git Repository Settings. Provide your user name and email, then choose OK to save.

How do I generate Git credentials in Azure DevOps?

The Git Credential Manager is an optional tool that makes it easy to create PATs when you're working with Azure Repos. Sign in to the web portal, generate a token, and then use the token as your password when you're connecting to Azure Repos. PATs are generated on demand when you have the credential manager installed.


1 Answers

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.

like image 104
kxiaocai Avatar answered Sep 21 '22 12:09

kxiaocai