Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix Git Error "RPC failed; HTTP 400 curl 22" permanently?

Tags:

git

git-push

I’ve been using Git for my project for a year without issues, but now I'm constantly getting this error when I try to push: "RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 send-pack: unexpected disconnect while reading sideband packet."

I know that if I use git config http.postBuffer 524288000 and then run git pull && git push, it works (for a while).

But I’d like to permanently fix the problem. Does anyone know how?

like image 326
Renata Avatar asked Dec 07 '25 01:12

Renata


1 Answers

This error often occurs due to issues with the buffer size Git uses for HTTP operations.

Increase the HTTP post buffer size:

git config --global http.postBuffer 157286400

This command increases the buffer size to 150 MB, which can help if you’re pushing large files12.

like image 122
مصطفى Avatar answered Dec 08 '25 13:12

مصطفى