簡體   English   中英

Github:遠程似乎不是 git 存儲庫

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM