Gitea Server NGINX(?) : error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

AlphaObeisance

Well-Known Member
Joined
Nov 7, 2022
Messages
255
Reaction score
251
Credits
3,300
Hey fellas. Forgive me for being short, but I've been up all night trying to get this gitea server setup but it's just been one thing after another.

First I had database issues, then I had credential issues, then I had this and then I had that. I should really stop trying to work through the night. Everything seems to be functional now except this one last issue (lord willing). I'm going to leave you with a few resources I'd found when searching for resolution on the googles; and steps I'd taken to try and rectify this issue myself.

If there's any kind soul out there that might be able to point out what dafaq I'm doin wrong here, I'd very much appreciate it. I'd like to get this server set up so I can start pushing to my private repo for storing configs and private projects and what nots. If it's not obvious by the end of this, I'm still a boon after all these years.

My google attempts (to show I aint just trying to mooch answers here).
Akin Issue - Stack Overflow
Similar GitLab Issue - Dead End | Unoptimal solution
Github Issue that leads to similar methods used in previous articles.
Another dead end
I think you should be pickin up what I'm layin down here. Everyone has seemingly run into this issue but none of the resolutions have worked for me (aside of yeetus deletus'n the server and starting from scratch).

ERROR :

Code:
Enumerating objects: 1944, done.
Counting objects: 100% (1944/1944), done.
Delta compression using up to 16 threads
Compressing objects: 100% (1874/1874), done.
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (1943/1943), 273.06 MiB | 22.18 MiB/s, done.
Total 1943 (delta 411), reused 0 (delta 0), pack-reused 0 (from 0)
fatal: the remote end hung up unexpectedly
Everything up-to-date

ATTEMPTS TO FIX:
permit port 3000 through UFW

$ sudo ufw allow 3000

Set Gitea max upload size
Code:
$ sudo nano /var/lib/gitea/custom/conf/app.ini

MAX_UPLOAD_SIZE = 10GiB

Edit nginx.conf
Code:
$ sudo nano /etc/nginx/nginx.conf

    client_max_body_size 1G;
    client_body_buffer_size 10M;
    client_header_buffer_size 1M;
    large_client_header_buffers 4 8M;

Git Client Configuration
Code:
git config --global http.postBuffer 524288000 # 500MB
git config --global core.compression 0 # Disable compression to avoid timeouts
 


You can use ssh with git if your http server doesn't work out. You might consider something like sudo bash to give you a root shell so you don't have to use sudo for everything. Have you checked the file system on the remote end? Can it handle a file of that size? You could try breaking stuff up into smaller pieces and putting it back together after it arrives.

Signed,

Matthew Campbell
 
Honestly I don't know what I did, but I managed to resolve the issue by starting over from scratch. Since I was clearly over extended and fatigued I honestly can't recall what I did to fix it.

I'd looked at so many articles on getting this set up, but I believe this one is the one that eventually got me rolling.

So nice to have a local git to work with, oh lordy. I don't program or work on projects (yet), but I'd really developed a desire to have a centralized LAN server to store configurations and such.
 


Members online


Latest posts

Top