Lesstep
Azure DevOps Server · Git over HTTPS · Checked November 22, 2026

Git push to Azure DevOps Server: "RPC failed; HTTP 413 curl 22 The requested URL returned error: 413"

413 means "request entity too large": a server in the path refused the push because its body was bigger than the limit that server has. Small pushes pass, large ones fail. With Azure DevOps Server the one that answers is usually not Azure DevOps but the reverse proxy or load balancer in front of it. Push once from the server itself (or around the proxy) to see whether it works there, then raise the body limit of the component that answers. Do not raise http.postBuffer.

What it looks like

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

Older Git versions print it as RPC failed; result=22, HTTP code = 413. Microsoft's page on push failures lists other codes of the same kind, result=22, HTTP code = 404, HTTP code = 411 and result=56, HTTP code = 0, and gives the same first questions for all of them (RPC failures and http.postBuffer). A login problem looks different: "Authentication failed".

The plugin does not push: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, reads and changes pull requests through the REST API with small requests, so this limit concerns Git, not the plugin.

1. Push around the proxy

Microsoft says that if the same push succeeds when the proxy or load balancer is bypassed, for example by pushing to localhost from the server itself, the proxy or load balancer is what needs fixing. Add a second remote that goes straight to the application tier and push the same branch to it. The address is a placeholder; use the one your administrator gives you for the server itself:

git remote add direct https://localhost/tfs/DefaultCollection/Project/_git/repo
git push direct HEAD

If this works and the usual address fails, go on with step 2 or 3. Remove the extra remote afterwards with git remote remove direct. If both fail, read step 4 and the Server's own IIS settings in step 3.

2. nginx in front

nginx answers 413 when the request body is larger than client_max_body_size. The default is 1m, and 0 switches the check off (nginx documentation). Set it in the server or location block that handles the Azure DevOps Server address, for example:

client_max_body_size 2g;

Then reload nginx (nginx -s reload) and push again. Other proxies and load balancers have a setting of the same kind under other names; look for "maximum request body" or "maximum upload size".

3. IIS: the web.config limits

Microsoft names two limits for the Server's own web site: maxAllowedContentLength and maxRequestLength in web.config (RPC failures and http.postBuffer). maxAllowedContentLength belongs to IIS request filtering; its default is 30000000 bytes, about 28.6 MB. When it is exceeded, IIS answers HTTP 404 and logs the substatus 413.1 "Content Length Too Large" (requestLimits, Microsoft Learn), so a plain 413 in Git's output points to a front component such as step 2, while a push that ends in 404 can be this limit. Look for 413.1 in the IIS log of the site, and raise the limit with the number of bytes you need (the value below is an example):

%windir%\system32\inetsrv\appcmd.exe set config "<IIS site name>" -section:system.webServer/security/requestFiltering /requestLimits.maxAllowedContentLength:2147483648

Run it in an elevated command prompt on the server, and check the new value in IIS Manager under the site's Request Filtering, Edit Feature Settings. Changes to the Server's own web.config should be made together with whoever administers it, because an update can replace the file.

4. Do not raise http.postBuffer

Old answers say to raise http.postBuffer. Microsoft says not to do it blindly. The Git manual says that raising it only turns chunked transfer encoding off for larger requests and is meant for a remote server or proxy that supports only HTTP/1.0 or does not follow the HTTP standard (git-config). Microsoft adds that a value above the server's request limit makes every push larger than that limit fail. See whether it is set, and remove it:

git config --show-origin --get-all http.postBuffer
git config --global --unset http.postBuffer
git config --local --unset http.postBuffer

The last two commands end with exit code 5 when the setting is not there; that is fine.

In the IDE

Git's push in a JetBrains IDE runs Git itself, so it ends in the same message, and the settings above are what to change. Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, does not push commits. It lists, reads and changes pull requests through the REST API of Azure DevOps Services or Server, through the IDE's HTTP Proxy settings, and keeps working while pushes are refused. The review inbox is free; voting, commenting and completing are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps is a trademark of Microsoft Corporation; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: Received HTTP code 407 from proxy · Git "Authentication failed" · Azure DevOps Server "unable to get local issuer certificate" · 日本語

Sources