使用github,如果有时需要切换不同的账号密码时,容易出现无法push的错误。这时候,最简单的办法,就是重置git config中的账号密码了。
其常见错误为:
fatal: unable to access : The requested URL returned error: 403
1. 可以使用git config --list 来查看用户信息,并进行更改;
这里有三种情况可用: --global, --local, --system
2. 如果更改用户名和邮箱没有效果,则需要重置系统设置:
git config --system --unset credential.helper