Skip to content
MtrXTools

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

The push is larger than the server or proxy accepts

Seen in git push over HTTPS to self-hosted GitLab, Gitea, Bitbucket or a reverse proxy

A reverse proxy or the Git server rejected the push because the request body exceeded its size limit.

Common causes

  • nginx in front of the Git server has a small client_max_body_size (the default is 1 MB).
  • The push contains large files or a lot of history in one go.
  • A load balancer or ingress controller enforces its own body size limit.

How to fix it

  1. Raise the limit on the proxy, e.g. client_max_body_size 512m; in nginx (or the nginx.ingress.kubernetes.io/proxy-body-size annotation), then reload.
  2. Push over SSH instead, which avoids HTTP body limits.
  3. Push in smaller batches of commits, and move large binaries to Git LFS.

Got a different message? Paste it into the error explainer.

Related errors

All 31 Dev tools & SSH errors