purazumakoiの[はてなブログ]

技術メモから最近はライフログも増えてきてます。

gitで fatal: The remote end hung up unexpectedly エラー

何かしばらくpushしずにいて、久しぶりにpushしようとしたら

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags 【Bitbucket】xxxxxxxx refs/heads/master:refs/heads/master 
Pushing to https://xxxxxxx@bitbucket.org/xxxxxxxx/xxxxxx.git
POST git-receive-pack (chunked)
error: RPC failed; curl 56 SSLRead() return error -9820
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Completed with errors, see above

こんなエラーがでた。 要は、量が多すぎるからでるみたい

postBufferを増やしましょう

特に、gitのローカルリポジトリがある場所じゃなくてもgit本体の設定だからどこで実行しても問題ない(--globalだからかな)

git config --global http.postBuffer 524288000

参照

gitでの fatal: The remote end hung up unexpectedly git config --global http.postBuffer 524288000