我克隆了一个项目,并且还更改了用户名&电子邮件(到zjffdu2),但是当我尝试将它推送到GitHub时,我得到了以下错误(看起来它仍然试图通过zjffdu推送),有什么我想念的吗? zjffdu是我的全局git名称,而zjffdu2是项目特定的名称。
ERROR: Permission to zjffdu2/myproject.git denied to zjffdu.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
git remote -v
的输出origin https://github.com/zjffdu2/zeppelin.git (fetch)
origin https://github.com/zjffdu2/zeppelin.git (push)
答案 0 :(得分:0)
这应该告诉你你是哪个用户
git config --global -l
这可以让你通过在文本编辑器中打开配置文件来改变git正在使用的用户名
git config --global --edit
当您与遥控器交互时,可能会要求您输入密码。