プログラミング学習日記

プログラミング学習時のメモ帳。

git に push / fetch / pull すると client_loop: send disconnect: Broken pipe

間違っている場所あったら優しく教えてね

環境

  • macOS Big Sur version 11.4
  • Mac Book Pro M1 チップ

エラー内容

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をつなぐことができた。

ブログを見ていただきありがとうございました