# Unable to push to repo due to \`RPC failed; HTTP 413 error\`

**URL:** <https://forum.gitea.com/t/unable-to-push-to-repo-due-to-rpc-failed-http-413-error/2630>\
**Category:** Install/Maintain/Configure\
**Created:** [November 10, 2020, 1:21am UTC](https://forum.gitea.com/t/unable-to-push-to-repo-due-to-rpc-failed-http-413-error/2630 "2020-11-10T01:21:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![manninga-ncsa](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manninga-ncsa](https://forum.gitea.com/u/manninga-ncsa)\
**Post date:** [November 10, 2020, 1:21am UTC](https://forum.gitea.com/t/unable-to-push-to-repo-due-to-rpc-failed-http-413-error/2630/1 "2020-11-10T01:21:02Z")

</div>

Recently it became impossible to push updates to our Gitea-hosted repo. We receive an error (shown below) that I do not know how to solve. A potential solution is to configure an SSH+GIT options, but this would require changes to our Kubernetes ingress rules that I’m not sure I can actually make (we are running Gitea as a Kubernetes deployment). I was able to push the updates to another copy of this repository on the host machine via `ssh`, but if I can’t push to the Gitea-controlled repo there is not much use to us for Gitea. Any help would be appreciated.

```auto
Pushing to https://example.com/repo.git
Enumerating objects: 139, done.
Counting objects: 100% (139/139), done.
Delta compression using up to 12 threads
Compressing objects: 100% (106/106), done.
Writing objects: 100% (124/124), 5.71 MiB | 149.90 MiB/s, done.
Total 124 (delta 24), reused 116 (delta 16)
POST git-receive-pack (5986730 bytes)
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

```

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [November 12, 2020, 11:08am UTC](https://forum.gitea.com/t/unable-to-push-to-repo-due-to-rpc-failed-http-413-error/2630/2 "2020-11-12T11:08:39Z")

</div>

It’s obviously, The request files are too large. Have you use a reverse proxy? If that, please check you have set a suitable post size limitation.

---

<div class="post-metadata">

**Author:** ![manninga-ncsa](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manninga-ncsa](https://forum.gitea.com/u/manninga-ncsa)\
**Post date:** [November 12, 2020, 1:20pm UTC](https://forum.gitea.com/t/unable-to-push-to-repo-due-to-rpc-failed-http-413-error/2630/3 "2020-11-12T13:20:10Z")

</div>

Now that you mention it, the Kubernetes ingress controller in front of the Gitea instance probably has configuration options to change the post size limits. Thanks for the idea.

---

<div class="post-metadata">

**Author:** ![manninga-ncsa](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@manninga-ncsa](https://forum.gitea.com/u/manninga-ncsa)\
**Post date:** [November 12, 2020, 1:24pm UTC](https://forum.gitea.com/t/unable-to-push-to-repo-due-to-rpc-failed-http-413-error/2630/4 "2020-11-12T13:24:13Z")

</div>

This looks promising

> **[Annotations - NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#custom-max-body-size)**

### Custom max body size

For NGINX, an 413 error will be returned to the client when the size in a request exceeds the maximum allowed size of the client request body. This size can be configured by the parameter `client_max_body_size` .

To configure this setting globally for all Ingress rules, the `proxy-body-size` value may be set in the [NGINX ConfigMap](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#proxy-body-size). To use custom values in an Ingress rule define these annotation:

```auto
nginx.ingress.kubernetes.io/proxy-body-size: 8m

```
