【发布时间】:2021-07-28 15:33:51
【问题描述】:
我在 Github 抛出错误时遇到了一些问题:致命:'remote' 似乎不是 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
谢谢。
【问题讨论】:
-
试试
https://github.com/StephenW789/CIS-41B-Final-Project-Public.git,你不应该使用你的存储库的网页展示的url,你应该使用github提供的克隆url。如您所见,该网址在某些情况下有效,但并非全部有效。