How to fix an RPC failure in Git

Stick figure falling

If your pushes to GitHub keep failing only a particular commit, you may be encountering this error:

RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 Bad Request

This happens when you are trying to push a stream to your remote branch using Git that’s larger than the allowed budget. For example, I ran into this error when trying to commit a bunch of screenshots and a video at once.

Luckily, I found this stackoverflow that had the solution! The fix is to up the buffer limit for that particular commit. (524288000 refers to the size limit):

git config http.postBuffer 524288000
git pull
git push

Discover more from Cloud Engineering Studio

Subscribe to get the latest posts sent to your email.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *