我几天前创建了一个测试git和github账号。今天我创建了一个新的github账号,并使用 git config --global user.name 和 git config --global user.email 命令更新了我的git终端用户名和电子邮件地址。但是,当我使用 git push origin master 将repo推送到我的新github帐户时,它仍然似乎使用我之前创建的测试git用户名,并给出以下错误:
remote: Permission to github repo url denied to old username.
fatal: unable to access github repo url: The requested URL returned error: 403
我也尝试删除旧用户,但什么都没用。当我运行git config --global --list时,它显示了我的新详细信息。
在发布这篇文章之前,我已经尝试了很多方法,所以我真的不知道问题出在哪里。非常感谢您的任何帮助!
git config --local --list
显示什么? - Leon