gitlab自托管大推送失败致命:远程端意外挂起
我正在向gitlab自托管实例添加一个新项目,但是:gitlab自托管大推送失败致命:远程端意外挂起,git,ssh,gitlab,Git,Ssh,Gitlab,我正在向gitlab自托管实例添加一个新项目,但是: 如果我尝试只使用自述文件来推送提交,它就会工作 如果我尝试使用大量文件来推动一个巨大的提交,它会失败: 示例命令: git push Counting objects: 965, done. Delta compression using up to 8 threads. Compressing objects: 100% (952/952), done. Writing objects: 100% (965/965), 1.30 MiB
- 如果我尝试只使用自述文件来推送提交,它就会工作
- 如果我尝试使用大量文件来推动一个巨大的提交,它会失败:
git push
Counting objects: 965, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (952/952), done.
Writing objects: 100% (965/965), 1.30 MiB | 1.51 MiB/s, done.
Total 965 (delta 479), reused 0 (delta 0)
Connection reset by x.x.x.x
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
sudo nano /etc/gitlab/gitlab.rb
顺便说一句,在服务器上,有一些进程正在运行并永远等待推送完成
gitlab 27227 0.0 0.0 95476 5220 ? S 11:23 0:00 sshd: gitlab@notty
gitlab 27228 0.0 0.0 4508 708 ? Ss 11:23 0:00 sh -c /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell key-1
gitlab 27229 0.0 0.0 30372 3796 ? Sl 11:23 0:00 git-receive-pack /var/opt/gitlab/git-data/repositories/third-parties/MyThirdParty.git
gitlab 27241 0.0 0.0 23036 4208 ? S 11:24 0:00 git index-pack --stdin --pack_header=2,965 --keep=receive-pack 27229 on dev --strict --fix-thin
我已经使用gitlab很长一段时间了,我从未见过这样的问题
推送是通过SSH完成的,因此显然Http Post缓冲区的增加没有影响。
我试图找到一些与git ssh缓冲区相关的配置,但它似乎不存在。编辑Gitlab配置文件:
git push
Counting objects: 965, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (952/952), done.
Writing objects: 100% (965/965), 1.30 MiB | 1.51 MiB/s, done.
Total 965 (delta 479), reused 0 (delta 0)
Connection reset by x.x.x.x
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
sudo nano /etc/gitlab/gitlab.rb
在Gitlab shell设置下
## GitLab Shell settings for GitLab
gitlab_rails['git_max_size'] = 104857600
只要选择一个足够高的数字
更新运行配置
sudo gitlab-ctl reconfigure
附加说明:我在SO和其他一些网站上读到,人们试图直接修改Gitlab根目录中的配置文件。。。不要这样做。它将被下一次重新配置覆盖。编辑Gitlab配置文件:
git push
Counting objects: 965, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (952/952), done.
Writing objects: 100% (965/965), 1.30 MiB | 1.51 MiB/s, done.
Total 965 (delta 479), reused 0 (delta 0)
Connection reset by x.x.x.x
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
sudo nano /etc/gitlab/gitlab.rb
在Gitlab shell设置下
## GitLab Shell settings for GitLab
gitlab_rails['git_max_size'] = 104857600
只要选择一个足够高的数字
更新运行配置
sudo gitlab-ctl reconfigure
附加说明:我在SO和其他一些网站上读到,人们试图直接修改Gitlab根目录中的配置文件。。。不要这样做。下次重新配置时会覆盖它