Git failed with a fatal error “Authentication failed”

I recently opened Microsoft Visual Studio for the first time in a long while and attempted to clone a repo from an Azure Dev Ops. Only to be greeted by the message.

Git failed with a fatal error “Authentication failed”

In this post will with cover how I resolved the issues. While my issue presenting itself with Visual Studio. The same resolution should work if you are having GIT authentication issues in other applications, or directly with GIT.

Solution

Firstly, I knew I had permissions to the Azure Dev Ops repo but just in case I double checked, all fine there.

So, I concluded it must have been GIT was attempting to authenticate with the wrong credentials. As I was not being promoted for any credentials, they must have been cached.

So, I opened a command prompt window and cleared my cached GIT credentials.

git config --global --unset credential. Helper 

Now when I re-attempted to clone the repo. I was prompted for credentials, I authenticated, and everything worked as expected.

A short and to the point post, but hopefully it helps!

Did this post help you out? Please consider supporting this site by donating on our Ko-fi page. Thanks

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.