When setting up a new Git repo on your development machine, you might encounter failures when trying to clone or push large files to your repo.
e.g. When running “git push”, the following error message is shown:
1 2 3 4 5 6 7 8 9 |
$ git push Counting objects: 2332669, done. Delta compression using up to 16 threads. Compressing objects: 100% (360818/360818), done. error: RPC failed; result=22, HTTP code = 411 fatal: The remote end hung up unexpectedly Writing objects: 100% (2332669/2332669), 483.30 MiB | 114.26 MiB/s, done. Total 2332669 (delta 1949888), reused 2330461 (delta 1949349) fatal: The remote end hung up unexpectedly |
To resolve this problem, increase the Git buffer size to the largest individual file size of your repo:
1 |
$ git config --global http.postBuffer 157286400 |