【发布时间】:2015-11-05 18:20:18
【问题描述】:
最近在网上学习了一门编程课程,要求我们将家庭作业上传到 Github,从那时起,每当我输入 git push -u origin master 时,我都会收到:
remote: Permission to my-github-username/mygithubrepo.git denied to rheros.
fatal: unable to access 'https://github.com/my-github-username/mygithubrepo.git/': The requested URL returned error: 403
rheros 是我用来推送家庭作业的存储库的名称。显然,现在我不再使用rheros,但命令行认为我仍在尝试推送它。我尝试检查我是否有错误的 SSH 密钥,但一切看起来都很好。
如何让我的命令行有效地忘记我之前推送到的完全不相关目录的存在?
编辑
git remote --verbose 给:
origin https://github.com/my-github-username/mygithubrepo.git (fetch)
origin https://github.com/my-github-username/mygithubrepo.git (push)
到目前为止,以下建议都没有帮助我:rheros repo 似乎在我的命令行后台某处运行,我不知道如何消除它。
【问题讨论】:
-
您能否添加(并评论)
git remote --verbose的结果 -
@user3276552 完成,请参阅编辑。
-
@user3276552 看来 rheros 正在尝试访问我的 .git....如何删除此活动?
-
而不是 git remote add origin github.com/my-github-username/mygithubrepo.git,应该是 git remote set-url origin github.com/USERNAME/OTHERREPOSITORY.git 来改变原点
-
@MaxPinto 是的,但我不是
rheros。我想重置自己,这样我的电脑就不会认为我作为rheros正在尝试访问https://github.com/my-github-username/mygithubrepo.git
标签: github