Reputation: 3469
I have an Azure DevOps account that I'm trying to use to host git repos. The problem is that when I add remote origin then try to git push -u origin --all
I'm prompted for a password, but the account's password results with: fatal: Authentication failed for...
Is there a different password you have to set up or something diffierent that needs configured to be able to access Azure DevOps Repos? I couldn't find a decent explanation as to why your account password fails or how to set another password that'll be accepted. Thanks for any tips or advice!
Upvotes: 7
Views: 16418
Reputation: 1284
I was getting the same experience from both cmd and VS Code pwsh terminal. Turns out that git apparently didn't like my password, which contained the & symbol. Changed the password and all good.
Upvotes: 0
Reputation: 597
Try logging into the Azure DevOps Website on the machine that the git repo lives on.
My scenario is that I was using Git on a different system than I use for the Azure DevOps UI. It randomly started giving me a bunch of 403's and the credential-manager login popup printed "failed to find location service" and failed to authenticate me into Azure DevOps.
Strangely enough, all I had to do was log in to the UI and that fixed the problem.
Upvotes: 4
Reputation: 3469
Ultimately I had to remove my first repo, then create a new one with the same name before being able to gain proper access. I have had zero issues with creating/updating/deleting repos afterwards.
It was solely the initial repo that was not working. Could've been an edge case, but if you find that the suggested steps aren't allowing you to access your azure repo, then try removing and recreating it.
note: The Create a new Git repo in your project page on MSDN's Azure section was rather helpful for this and other issues you may come across.
Upvotes: 3
Reputation: 1323115
Check if you have a credential helper setup: git config credential.helper
.
If your remote URL is an HTTPS one, the wrong credentials might have been cached.
If so, see "Updating credentials from the OSX Keychain": git credential-osxkeychain erase https://<azure domain>
Upvotes: 1