LoginSignup
0
0

More than 1 year has passed since last update.

大量のファイルをgit pushした際に、「client_loop: send disconnect: Broken pipe」エラーが発生

Posted at

筆者の環境

ターミナル:iterm2
git:git version 2.30.1 (Apple Git-130)

現象
大量のファイルを「git push」した場合、「client_loop: send disconnect: Broken pipe」とエラーが表示される

client_loop: send disconnect: Broken pipe
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

「client_loop: send disconnect: Broken pipe」を元に調査し、2つの対応を実施

解決方法

①http.postBuffer

git config --global http.postBuffer 157286400

大きいサイズをpushする場合バッファサイズを使用するため、増減を上げる
この設定は、公式に記載がある通り、小さなファイルのpushでもメモリを大量に消費する場合があるので、解決したら戻しましょう

②サーバの応答回数の設定

vi ~/.ssh/config

Host github.com
 ServerAliveInterval 60
 ServerAliveCountMax 30

上記設定は、sshでリモートアクセスする際に、サーバが応答なかった場合、60秒間維持しその接続を30回繰り返すという設定

上記2つの対応を行なった後にエラーが変わり、下記対応に続く

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0