[英]Github: Remote does not appear to be a git repository
I'm having some trouble with Github throwing the error: fatal: 'remote' does not appear to be a git repository.我在 Github 抛出错误时遇到了一些问题:致命:“远程”似乎不是 git 存储库。
I did the cloning, which was successful.我做了克隆,成功了。
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
I then did this, which ended up having the error message然后我这样做了,最终得到了错误消息
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.
I tried the following, but the issue still persists.我尝试了以下方法,但问题仍然存在。
git remote remove origin
git remote add https://github.com/StephenW789/CIS-41B-Final-Project-Public
git fetch remote main
Thank you.谢谢你。
This is because remote
is not the name of the remote: origin
is the name of the remote.这是因为remote
不是遥控器的名称: origin
是遥控器的名称。 That is: instead of git fetch remote
you want git fetch origin
.也就是说:而不是git fetch remote
你想要git fetch origin
。
I, like Lasse V. Karlsen and yourself, missed this on the first few read-throughs.我和 Lasse V. Karlsen 和你自己一样,在最初的几次阅读中错过了这一点。 It's very easy to read "remote" as the correct name of the remote.很容易将“remote”读作遥控器的正确名称。 :-) :-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.