0

I have added a remote to my git repository for Azure devops I called "originAzure". When I go through visual studio (sync -> push -> select the remote) it works correctly. The Azure Devops account is authenticated with windows authentication. On the first push through Visual Studio it prompts me to select an domain account, then creates a personal access token in windows credentials manager under "git:https://@dev.azure.com" and "git:https://Personal Access Token@dev.azure.com". However if I need to use the command line to push with additional options, Git only prompts for my password, then rejects my windows password. I assume it is expecting the Personal Access Token as a password. How can I command git to ask for my domain name and password instead? Or how can I use this Personal access token Visual Studio seems to be able to use?

I have tried removing the credentials from windows credential manager, but Git's command line behavior remains unchanged. I have not been able to find a way to view the Git commands produced by Visual Studio to look for the discrepancy and apparently it is not really an option.

S:\ myPath>git push originAzure 
Password for 'https://<username>@dev.azure.com':
fatal: Authentication failed for 
'https://<username>@dev.azure.com/<username>/<repoAddress>

1 Answers1

0

How can I command git to ask for my domain name and password instead?

I recommend that you could use Git Credential Manager for Windows.

You could download it from this link. It allowed us to sign in with username and password. For more information please refer to the screenshot.

enter image description here

Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47