# Gitea — HTTP 413 on large push (e.g. js repo) **Issue:** Pushing the **js** repo (~1.1GB .git, 220k+ objects) to Gitea fails with: ```text error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 send-pack: unexpected disconnect while reading sideband packet ``` **Cause:** The push request body exceeds the server’s allowed size (Gitea and/or Nginx). --- ## Fix on Gitea server (dev VM or wherever Gitea runs) 1. **Gitea `app.ini`** (e.g. `/etc/gitea/app.ini` or `/opt/gitea/custom/conf/app.ini`): ```ini [server] HTTP_MAX_REQUEST_BODY = 1073741824 ``` (1GB in bytes; increase further if needed.) 2. **NPMplus** (Gitea is behind NPMplus at gitea.d-bis.org): In NPMplus UI: Proxy Hosts → gitea.d-bis.org → Advanced → add: ```nginx client_max_body_size 1024M; ``` Or via NPMplus API: set `advanced_config` for the gitea.d-bis.org proxy host to include this directive. 3. Restart Gitea (and Nginx if changed), then retry the push: ```bash cd ~/projects/js git push "https://${GITEA_TOKEN}@gitea.d-bis.org/d-bis/js.git" main --set-upstream ``` --- ## Client-side (optional) Increasing Git’s `http.postBuffer` can help with some proxies; it does **not** fix a server 413: ```bash git -C ~/projects/js config http.postBuffer 524288000 ``` --- ## Push-all script `scripts/dev-vm/push-all-projects-to-gitea.sh` pushes all repos; **js** will keep failing until the server limit is raised. You can re-run the script after fixing the server; other repos are unchanged.