ls [internet]

技術メモ

git cloneしたらERROR: Repository not found.

githubを使おうとして、git cloneでssh経由でのcloneが失敗した。

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

HTTPSではclone成功しているので、権限がないとかではなさそう。
cloneが失敗するので、remoteが間違っているよとかでもない。
ssh鍵の再登録などしても変化なし。

https://help.github.com/articles/error-repository-not-found/

ssh -T git@github.com

やってみろと。

> ssh -T git@github.com
Hi [username]! You've successfully authenticated, but GitHub does not provide shell access.

結論から言うと、.ssh/configの記述が間違っていて想定するユーザーとkeyになっていなかった。
この確認はsshコマンドなので、-vオプションが使える。

ssh -v -T git@github.com

ユーザーを直して確認して、正常になりました。

port 22 が使えない環境でも以下のように確認が使えるようだ。

ssh -p 443 -T git@ssh.github.com