【解决】Git failed with a fatal error. Authentication failed for ‘http://......’

时间:2023-03-09 20:47:19
【解决】Git failed with a fatal error. Authentication failed for ‘http://......’

今天在visual studio中运行项目,打算pull最新的代码的时候,报错:

Git failed with a fatal error. Authentication failed for ‘http://......’

1. 首先你要看一下是不是自己的账号密码错误,不匹配

git config --global --list

2. 如果账号密码正确则尝试一下这个解决方案:

git config --system --unset credential.helper

3. 有些人可能会出现新的问题:

error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied.

可以通过路径 Control Panel | User Accounts | Credential Manager 在 Generic Credentials找到对应的权限

【解决】Git failed with a fatal error. Authentication failed for ‘http://......’

Figure: 移出出错项目的对应用户凭证

note: 当然也可以通过 Control Panel | All Control Panel Items | Credential Manager 找到对应路径

接下来再尝试pull的操作重新输入账号密码,问题就被解决了