0 votes
1 view
in Azure by (5.8k points)

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 cmd:

git remote add origin

https://XXXXXXX.visualstudio.com/DefaultCollection/_git/project

git push -u origin -–all

Any idea of the fix for this?

2 Answers

0 votes
by (9.6k points)

Go to Control Panel and then navigate to Credential manager. Change the username and password from Git repository. 

Usually, when you are pushing the repository, there is a pop-up that asks you to login to your Azure account. 

You can also, set the username and email in the beginning by setting the global variable. 

These links will help:

https://docs.microsoft.com/en-us/azure/devops/repos/git/share-your-code-in-git-vs-2017?view=azure-devops

https://docs.microsoft.com/en-us/azure/devops/repos/git/pushing?view=azure-devops&tabs=visual-studio

Want to learn Azure? Then you can join Intellipaat's Azure Training.

0 votes
by (63.4k points)

I have had the 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.

I hope it helped you!

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...