Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "fatal: Authentication failed" -error when sending git commands in Windows 10

After updating domain password, accessing git-repo is no longer possible. VS Code and Source Tree as well as Visual Studio are returning the following error message on pull, push, fetch etc..

fatal: Authentication failed 

Normally a credentials pop-up should appear however this is not happening. Also the common recommendation...

git config --global credential.helper wincred 

...is not working.

like image 704
Jesper Wilfing Avatar asked Mar 16 '17 09:03

Jesper Wilfing


People also ask

How do I change my Git credentials in Windows?

To update your credentials, go to Control Panel → Credential Manager → Generic Credentials. Find the credentials related to your Git account and edit them to use the updated password. This should be the accepted answer if git config --list contains credential. helper=wincred .


2 Answers

The password is stored in windows credential manager and needs to be updated. Open command prompt and enter the following command to view the list of stored passwords:

rundll32.exe keymgr.dll,KRShowKeyMgr 

Scroll down in the list until you spot the git-related entries. Click it and edit the correct password.

Voilà!

Windows 10 - Stored user names and passwords

like image 114
Jesper Wilfing Avatar answered Oct 13 '22 04:10

Jesper Wilfing


I agree with Jesper, Other way to do is - On windows, if you can navigate to :

Control Panel\User Accounts\Credential Manager

Under Windows Credentials\Windows Vault page on Generic Credentials, you can update the password of existing GIT record or can also add new Generic Credentials.

Updated answer for Mac users :

In case if you're here with similar issue on Mac, you can do similar thing in keychain access - by deleting the existing GIT record, & then if you pass your credentials again in git bash or any other tool a new record gets created, things should work.

like image 21
whoami - fakeFaceTrueSoul Avatar answered Oct 13 '22 05:10

whoami - fakeFaceTrueSoul