2

It seems I have got somewhere wrong credentials and are cached which is not allowing me to push the code to Azure DevOps (Azure Repository).

I am using Git Bash as a client tool.

Error Message as below:

fatal: Authentication failed for 'https://xxx.visualstudio.com/DefaultCollection/dms/_git/reponame/'

I tried the below solutions but have had no luck

  1. Stop and start Git bash

  2. git config --global credential.helper "cache --timeout=60"

3 Renamed C:\Users\hp\AppData\Local\GitCredentialManager\tenant.cache to C:\Users\hp\AppData\Local\GitCredentialManager\tenant.cache.bak Even deleted tenant.cache still no fun...

learner
  • 2,480
  • 10
  • 50
  • 94

1 Answers1

2

The Good News is that Git Bash (as well as Git GUI) are typically configured to use Windows Credentials Mgr.

Try this:

  • Start > Credentials ("Credential Manager") > Generic credentials
  • DELETE your Azure DevOps URL (it might be called "azure", it might be called "MicrosofAccount")
  • Try pushing to Azure DevOps again. You should be prompted for username/password.

In parallel, you could also try:

git config --global --unset credential.helper
git config --global --add credential.helper manager
paulsm4
  • 114,292
  • 17
  • 138
  • 190