【发布时间】:2021-11-02 18:04:37
【问题描述】:
是否有一种快速的方法可以在 Windows 上的 cmd 中使用 git 上的不同帐户注销并重新登录? 我试过了:
git config --global --unset user.name
git config --global --unset user.mail
git config --global --unset credential.helper
所以我知道我应该使用 old_user_name 注销? 然后我用了:
git config --global user.name "new_user_name"
git config --global user.email "new_email"
git push origin master
我得到了按摩:
remote:对 old_user_name 的 new_user_name/new_repo.git 的权限被拒绝。 致命:无法访问'https://github.com/new_user_name/new_repo.git/':请求的URL返回错误:403
这意味着我仍然使用旧帐户登录。我还能做什么?
【问题讨论】: