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配置文件调整最大可上传温度大小