![git clone:“遠端:找不到您要找的名稱空間。” ……“致命:無法從遠端存儲庫讀取。”](https://rvso.com/image/1645720/git%20clone%3A%E2%80%9C%E9%81%A0%E7%AB%AF%EF%BC%9A%E6%89%BE%E4%B8%8D%E5%88%B0%E6%82%A8%E8%A6%81%E6%89%BE%E7%9A%84%E5%90%8D%E7%A8%B1%E7%A9%BA%E9%96%93%E3%80%82%E2%80%9D%20%E2%80%A6%E2%80%A6%E2%80%9C%E8%87%B4%E5%91%BD%EF%BC%9A%E7%84%A1%E6%B3%95%E5%BE%9E%E9%81%A0%E7%AB%AF%E5%AD%98%E5%84%B2%E5%BA%AB%E8%AE%80%E5%8F%96%E3%80%82%E2%80%9D.png)
嘗試從 GitLab 複製我的測試儲存庫時,我收到以下錯誤。
C:\Users\USERNAME\Documents\MYPROJECT\test>git clone [email protected]:GITUSERNAME\test.git
Cloning into 'test'...
remote:
remote: ========================================================================
remote:
remote: The namespace you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
答案1
只是想與其他人分享這個愚蠢的錯誤,將 Windows 路徑分隔符號「\」與 URL 分隔符號「/」混淆:
代替
git clone [email protected]:GITUSERNAME\test.git
你需要
git clone [email protected]:GITUSERNAME/test.git
和 ”/”。
這看起來似乎很明顯,但我花了一些時間才意識到這一點。
後期補充:
我又遇到了同樣的錯誤,但由於另一件事,它仍然只是一個錯誤的 URL。我試過
git clone ssh://[email protected]:GITUSERNAME/test.git
雖然我需要:
git clone [email protected]:GITUSERNAME/test.git