21
20

More than 5 years have passed since last update.

Git push エラー (error: RPC failed; result=55, HTTP code = 0)の対処

Last updated at Posted at 2014-09-05

https で remote 設定している 外部 Git ホスティングサービス への push にて上記エラーになりました。
コミットに画像ファイルをいくつか入れていたのでコミットサイズが比較的大きいコミットが含まれている場合
に頻繁にエラーになります。
(下記は、Windows 上 の SourceTree 上で実行したpush時のエラーメッセージです)

エラー

error: RPC failed; result=55, HTTP code = 0

詳細

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
POST git-receive-pack (chunked)

fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

error: RPC failed; result=55, HTTP code = 0

ググると、httpを使うと良いとか、sshを使えばよいかもとかいろいろ情報がありました。

ひとまず、下記でOKでした。

対策

git config http.postBuffer 52428000

ちなみに、 git config http.postBuffer 524288000 では同じ現象で回避できませんでした。うむ。

git config --global http.postBuffer 52428000

なお、global オプションにてリポジトリ全体に適用しておくと良いかもしれません。

21
20
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
21
20