切换了GitHub账号后,发现代码push不上去了,报403错误:
$ git push
remote: You must verify your email address.
remote: See https://github.com/settings/emails.
fatal: unable to access 'https://github.com/lollicupusa/lollicupStore2.git/': The requested URL returned error: 403
2. 运行 gitlist命令,查看账户信息中有与当前账户不符的部分,也一一改了过来。
问题原因:从错误信息可以看出, 执行git push
时读取的账号信息是之前的账号. 因此, 本地某个位置肯定存储了github的帐号信息 ==>
解决方案:
[http]
sslBackend = openssl
sslCAInfo = D:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
[credential]
helper = manager
git的安装目录下找到一个配置文件,D:\Git\mingw64\etc\gitconfig,修改[credential]helper = store就可以了
现在你再执行git push
便会出现让你输入用户名密码的步骤, 这时候输入你当前仓库的账号信息就OK啦!
或者 解决办法:
https://blog.csdn.net/Aman1984/article/details/77774811