ProjectStack
git

error: RPC failed; HTTP 400 curl

The HTTP request Git made to the remote server was rejected or failed mid-transfer. This often happens with large pushes or pulls when a buffer size or timeout limit is exceeded.

Common causes

  • The repository is too large for the default HTTP buffer size
  • A proxy, firewall, or CDN is truncating or rejecting the request
  • The server returned a 413 (request too large) or 400 (bad request)
  • Slow or intermittent network dropping large transfers

How to fix it

  1. Increase the Git HTTP buffer: git config --global http.postBuffer 524288000
  2. Try using SSH instead of HTTPS: git remote set-url origin [email protected]:user/repo.git
  3. Split a large initial push by pushing a shallow history first
  4. Check if a proxy or VPN is interfering and try disabling it

Example

error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 fatal: the remote end hung up unexpectedly

Pushing a large initial commit or a repo with large binary files over HTTPS

Have a different error?

Paste any error message into the Error Translator to get an instant explanation.