当前位置:   article > 正文

【Exception】error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413_git 413 send-pack

git 413 send-pack

案发现场

使用 git 将本地的代码,推送到远程仓库时,推送失败(使用的http协议)。错误信息如下:

$ git push 
Enumerating objects: 3383, done.
Counting objects: 100% (3383/3383), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1216/1216), done.
Writing objects: 100% (3383/3383), 6.96 MiB | 81.92 MiB/s, done.
Total 3383 (delta 2303), reused 3007 (delta 2034), pack-reused 0
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
Everything up-to-date
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

解决方案

本次 push 的数据大小为 17M。

一、从 Git 的角度解决问题,可以增加 http.postBuffer 的大小

git config http.postBuffer 524288000
  • 1

二、因为我的 Gitlab 服务是用 Nginx 做了域名代理,所以可能是 nginx 的 client_max_body_size 的限制,可以做如下调整:

client_max_body_size 1024m;
  • 1
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号