Error in pushing changes to remote git repository

Posted on 22-11-2017 by Nadir Latif


Source: https://confluence.atlassian.com/stashkb/error-rpc-failed-result-22-push-to-stash-fails-604537633.html

If we have a git repository with large files, and we need to push changes to a remote repository, then we might get the following error:

Counting objects: 9554, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5064/5064), done.
Writing objects: 100% (9554/9554), 2.79 GiB | 694.00 KiB/s, done.
Total 9554 (delta 4382), reused 9554 (delta 4382)
error: RPC failed; result=22, HTTP code = 502
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

To correct this error we need to increase the size of the git configuration variable http.postBuffer. We can do this with the command: git config --global http.postBuffer 157286400