Sometimes, when importing a new project in Git, or pushing a large commit, you’ll receive the following error,
error: RPC failed; result=22, HTTP code = 411 fatal: The remote end hung up unexpectedly
This error occurs when sending data over HTTP which is larger than Git’s post buffer (by default 1 MB.
git config --global http.postBuffer 524288000
The –global argument saves the setting to ~/.gitconfig, this allows for 500MB of data.
If you are still receiving errors, then there is a limitation on the Git server.
- if using Nginx as frontend: in the http section, add
That’s it. Let me know if there are other solutions.