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:

Advertisements
Git rpc failed with http code 411