当我尝试从 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