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

后端 未结 9 1168
孤独总比滥情好
孤独总比滥情好 2021-01-30 01:40

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, pus

9条回答
  •  北恋
    北恋 (楼主)
    2021-01-30 02:08

    I have experience a similar issue with Windows 10 and here's how I have solved it:

    1. From Windows Search, type Credential Manager:

    1. Open Credential Manager, and navigate to Windows Credential Tab:

    2. You should see an entry for git credentials in Windows Credential Manager:

    Here is the root cause, this git credentials is locally cached/saved to your local computer, and since we have changed our Active Directory password, it is currently out of synch.

    1. Click Edit, and change this to your new/changed Active Directory password (this password has to match your new/changed Active Directory password) :

    Note: This is for using git with https only, not for SSH: https://docs.github.com/en/free-pro-team@latest/github/using-git/which-remote-url-should-i-use

    1. Save, it should work (does not require terminal or machine restart).

    Lastly, if you do not have access to Credentials Manager (due to admin/security policy), you can force git to prompt for password by do a git pull from the specific repo by using username based repo url, e.g.

    git pull https://{yourgitusername}@{gitrepo}.git
    

    Note that, this is repo specific so you will have to do this each repo.

    Good luck.

提交回复
热议问题