前提
代碼管理我是用Gogs.Git,前些陣子使用Nginx將git.balabiu.com反向代理到了Gogs的默認埠,其他二級域名準備做其他使用,
導致上報代碼出現了錯誤,
問題
推送代碼報錯誤
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

解決
查了一下413錯誤,查到 ”通過post上傳檔案過大時,會出現413錯誤碼“ ,初步確定了是Nginx配置導致的,
于是百度了一波Nginx,設定 client_max_body_size 引數可以修改上傳檔案大小限制,
server{ listen 80; server_name git.balabiu.com; client_max_body_size 100m; location /{ proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:5100; } }
重新推送代碼,問題解決,
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/144525.html
標籤:Linux
下一篇:Linux查看系統硬體資訊命令
