Original Posted: https://www.chenxublog.com/2019/05/26/gitea-gogs-push-rpc-failed.html
Trump recently engaged in export control, GitHub also update the corresponding provisions, in order to prevent any problems out of their own code, on their own to build a gitea to mirror all of its projects on GitHub above
But when push a hundred M-sized warehouse, reported this error:
git.exe push --progress "2" master:master
Enumerating objects: 768, done.
Counting objects: 100% (768/768), done.
Delta compression using up to 4 threads
Compressing objects: 100% (455/455), done.
Writing objects: 100% (768/768), 57.69 MiB | 84.16 MiB/s, done.
Total 768 (delta 316), reused 708 (delta 290)
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
Everything up-to-date
git did not exit cleanly (exit code 1) (1938 ms @ 2019/5/26 22:08:16)
bing search, online common solution is to change the size http.postBuffer, but no effect
Later on GitHub I found this: https://github.com/go-gitea/gitea/issues/5805#issuecomment-477523202
Nginx is simply upload size limit is too small (the default), you can use the big change:
server
{
listen 80;
listen 443 ssl http2;
server_name git.papapoi.com;
client_max_body_size 100M; # Push large objects to gitea
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/git.papapoi.com;
#其他设置.....
}
Problem perfect solution