文章

Git报错:remote: HTTP Basic: Access denied的解决方法

Git报错:remote: HTTP Basic: Access denied的解决方法

Git报错:remote: HTTP Basic: Access denied的解决方法

问题出现原因:

本地git账号信息与远程git仓库账号不一致导致的。

1
2
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://localhost/xxx.git/'

解决方案:

1、配置用户信息

1
2
3
git config --global user.name [username]

git config --global user.email [email]

2、查询用户信息

1
git config --list

3.重置本地git仓库账号密码

1
git config --system --unset credential.helper

完毕

本文由作者按照 CC BY 4.0 进行授权