Twice in the last 2 weeks I’ve faced an annoying size limit issue when pushing to an https Git repository.
Counting objects: 2935, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2570/2570), done.
error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
Writing objects: 100% (2933/2933), 3.44 MiB | 955.00 KiB/s, done.
Total 2933 (delta 1205), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
The fix is quite simple: open .git/config on your project’s root directory and add the [http] section below:
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
precomposeunicode = false | |
[remote "origin"] | |
url = https://iamnotyou@bitbucket.org/iamnotyou/le-large-projet.git | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
[branch "master"] | |
remote = origin | |
merge = refs/heads/master | |
[http] | |
postBuffer = 524288000 |