git に push / fetch / pull すると client_loop: send disconnect: Broken pipe
間違っている場所あったら優しく教えてね
環境
エラー内容
git関連の操作を行うと動作しなくなっていた。
$ git push
client_loop: send disconnect: Broken pipe
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解決法
configの内容を変えてあげると解決した。
Host github.com HostName github.com IdentityFile ~/.ssh/id_rsa // 秘密鍵のパス User git
Host github
と書いてある記事をいくつかみたが、それだと失敗してしまう。Host github.com
と正しく書かなくてはいけない。
これでリモートへのgitHubをつなぐことができた。