git clone: 「リモート: 探している名前空間が見つかりませんでした。」...「致命的: リモート リポジトリから読み取れませんでした。」

git clone: 「リモート: 探している名前空間が見つかりませんでした。」...「致命的: リモート リポジトリから読み取れませんでした。」

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

関連情報