Git rpc failed with http code 411

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

view raw
gistfile1.sh
hosted with ❤ by GitHub

Git rpc failed with http code 411

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s