Gitlab上传大文件报错 Too Large
Gitlab上传超过1G文件报错
git push
warning: redirecting to http://192.168.3.215/ai/invalid_detection_model.git /
Counting objects: 3, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (2/2), done.
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
fatal: The remote end hung up unexpectedly
Writing objects: 100% (3/3), 1.06 GiB | 9.28 MiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date
原因
gitlab默认限制上传文件大小
解决方法
修改gitlab配置文件把最大文件进行调整
# vim /etc/gitlab/gitlab.rb
修改添加以下配置
# nginx['client_max_body_size'] = '4096m'
应用配置
# gitlab-ctl reconfigure
注意:如果gitlab使用了其他代理如Nginx则也需要修改对应Nginx配置文件调整最大可上传温度大小
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步