推入gitlab

时间:2017-07-20 17:59:28

标签: git gitlab

在这种情况下,我已经安装了一个带有gitlab的交钥匙linux。我设置了一个静态IP。 当我推送文件时它没问题,但是当我推送所有symfony项目时它返回错误

$ git push
Counting objects: 7854, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7449/7449), done.
Writing objects: 100% (7854/7854), 6.45 MiB | 2.08 MiB/s, done.
Total 7854 (delta 2669), reused 0 (delta 0)
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

我尝试了什么:

  • 修改/ home / git / gitlab / config中的gitlab.yml,将git max-size更改为20971520(20 mb)
  • 更改了postBuffer:git config --global http.postBuffer 524288000
  • 也使用一小部分文件进行了不同的提交,但有效但根本没有

2 个答案:

答案 0 :(得分:1)

显然,这是gitlab(https://gitlab.com/gitlab-org/omnibus-gitlab/issues/1883)中的一个已知问题。解决方法是使用ssh而不是http推送。

答案 1 :(得分:0)

使其作为HTTP工作的另一种方法是更改​​nginx的配置文件。 client_max_body_size的默认值为1M。因此,在文件/etc/nginx/nginx.conf中添加类似

http {
    client_max_body_size 100M;
}

通过这种方式,您可以通过HTTP推送最大100 mb