Member-only story
Git error: RPC failed
You’re pushing code to a repository, and for the most part it looks like everything is going smoothly, and all of a sudden you see this error:
RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (69/69), 10.32 MiB | 17.49 MiB/s, done.
Total 69 (delta 41), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Honestly, its a weird error, and it doesn’t show up quite that often, which is why you might get anxious.
It has a very simple fix and that is to increase Git buffer size.
The command to do so:
git config — global http.postBuffer 524288000
What this does, is that it increases Git buffer size to 500 MB, and so that allows it to handle larger pushes to the repository.
Why this error pops up in the first place could be due to a few reasons, it could be either related to network issues or Git push request exceeds server’s size limit.
Note that, forcing the push won’t work and it’s not recommended to do so.