当我执行git push
时出现此错误:
$ git push -vv
Pushing to https://github.com/...
remote: Permission to ... denied to foobar.
fatal: unable to access 'https://github.com/...': The requested URL returned error: 403
我注意到foobar
用户不是我的用户
$ git remote -v
origin https://github.com/... (fetch)
origin https://github.com/... (push)
我配置的github用户是其他人:
$ git config github.user
ThisIsMe
$ git config --local github.user
我所在的git模块也没有引用foobar
中的.git/modules/ext/config
有任何线索吗?
答案 0 :(得分:1)
如果使用Windows,请转到:
控制面板>用户帐户>凭据管理器> Windows凭据>通用凭据
接下来,删除Github键。 :)