@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

1MBのファイルをgit pushできない

画像など、大きめのファイルを含むコミットをプッシュすると、こんなエラーが出ていた。 環境はGitBucketですが、結果的にGitBucketは関係なかった。

Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 998.46 KiB | 0 bytes/s, done.
Total 4 (delta 1), reused 0 (delta 0)
error: RPC failed; result=22, HTTP code = 501
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

ここの下の方に解決策が載っていた。

error: RPC failed result=22 - Push to Stash fails - Stash Knowledge Base - Atlassian Documentation

ポストするバッファのサイズを大きくするとプッシュできた。

git config --global http.postBuffer 157286400