我 fork 然后克隆了一个 github 存储库,我对其进行了一些更改,提交了它们,然后尝试推送:
Nates-MacBook-Pro-2:ReReplay nate$ git push origin master
fatal: remote error:
You can't push to git://github.com/natereed/ReReplay.git
Use git@github.com:natereed/ReReplay.git
Nates-MacBook-Pro-2:ReReplay nate$
错误信息是什么意思?
最佳答案
错误似乎暗示了一个解决方案:
You can't push to git://github.com/natereed/ReReplay.git
Use git@github.com:natereed/ReReplay.git
这意味着 git://
URL 通常是“匿名的”——它们不支持身份验证,因此在 Github 上你不能写信给它们。为了写入存储库,您需要使用 ssh
(git@github.com:...
) 或 http 访问它。
当然,这假定您的 GitHub 帐户已获得对存储库的写入权限。
您可以像这样重新配置存储库的本地副本以使用 ssh URL:
git remote set-url origin git@github.com:natereed/ReReplay.git
https://stackoverflow.com/questions/14347302/