Search code examples
gittfsvisual-studio-2017fatal-errorcredential-manager

Visual Studio 17 - GIT Fatal Error: Authentication failed for 'https://tfs.tpsonline.com/.....'


I am using GIT in VS 17 on Windows 10.

Every time I try to check in, sync, pull or push branch it gives me authentication failed error. I fix it by updating my password in Windows credentials but I have to do it every time I switch my branch.

Updating password in windows credentials only work for once, as soon as I switch branch I receive this authentication failure response.

What is the permanent solution where I don't have to update my password in windows credentials every single time?

Let me know if you need any more specifications info ..


Solution

  • According to your description and situation, this maybe related with some Credential cache.

    Make sure you have clean the cache with Visual Studio 2017.

    Besides, you could also try to run Visual Studio under sign-in credentials that are different from your signed-in Windows account, open the context menu for devenv.exe to access your run as options. If you don't see the run as option as shown in the following example, you may need to press SHIFT before right-clicking to see the run as options.

    enter image description here

    You can locate the executable in the following folder: *Drive*:\\Program Files (x86)\Microsoft Visual Studio xx.0\Common7\IDE\ Which may do the trick.

    If above still not work, instead of update password in Credential Manager, try to remove it. When connect git in VS2017, you should be able to enter it again. More ways for troubleshooting, pleas take a look at weiwei's answer in this similar question Git failed with a fatal error.Authentication failed when clone repository from VS 2017

    Finally, as a workaround, you could also try to use Personal Access Token and use that to connect directly. For details please refer https://stackoverflow.com/a/56028075/5391065