1

I'm trying to access TFS server using command line (to run some git commands) and when it asks for username and password I enter my work account but it doesn't accept my work account.

My work account is fine because when I try to access the website by clicking on the link (log in with your work account) it accepts my credentials.

Daniel
  • 3,322
  • 5
  • 30
  • 40
  • Which kind of account are you using? Domain account for TFS or VSO account? Got any error info? Suggest you to provide a screenshot. – PatrickLu-MSFT Feb 26 '16 at 08:07

1 Answers1

4

If your repository is hosted on Visual Studio Online, you must enable basic authentication before you can use the command prompt to perform Git tasks. You can set this up from your User Profile in TFS. More details you can see the link from MSDN: Work from the Git command prompt

enter image description here

You can also check the answers from this question:Unable to Authenticate with Git Bash to Visual Studio Team Services .Moreover, if you want to avoid having to enter your credentials every time. You can try to install Git Credential Manager for Windows


If you are using TFS account, no need to do above. First please make sure you have permission to enter the Git repository.

Then try to delete the credentials in the Control panel -> Users -> Manage credentials and also try to give name/password explicitly in the url: https://name:password@.... or you need to reinstall Git client. More ways to trouble shooting this error, you can find in this question: Git: Failed to erase credential: Element not found

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62