[英]Github: Remote does not appear to be a git repository
我在 Github 抛出错误时遇到了一些问题:致命:“远程”似乎不是 git 存储库。
我做了克隆,成功了。
git clone https://github.com/StephenW789/CIS-41B-Final-Project-Public
cd CIS-41B-Final-Project-Public
git remote -v # Prints out the correct origin as expected
然后我这样做了,最终得到了错误消息
git fetch remote main
fatal: 'remote' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我尝试了以下方法,但问题仍然存在。
git remote remove origin
git remote add https://github.com/StephenW789/CIS-41B-Final-Project-Public
git fetch remote main
谢谢你。
这是因为remote
不是遥控器的名称: origin
是遥控器的名称。 也就是说:而不是git fetch remote
你想要git fetch origin
。
我和 Lasse V. Karlsen 和你自己一样,在最初的几次阅读中错过了这一点。 很容易将“remote”读作遥控器的正确名称。 :-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.