主页 > 编程资料 > 编程更多 >
发布时间:2018-05-01 作者:网络 阅读:245次

环境如下:gitlab服务器redhat,客户端环境mac os,如果是其他环境遇到问题仅供参考

如果gitlab上传代码提示:

error: RPC failed; result=22, HTTP code = 411

该问题是由于客户端设置的http_post_buffer大小不足导致的,解决方法如下:

进入到工程所在的终端目录下执行:

git config http.postBuffer 524288000

如果gitlab上传代码提示:

error: RPC failed; result=22, HTTP code = 413

该问题是由于gitlab服务器端client_max_body_size参数过小大致的,解决方法如下:

进入到服务器的终端目录:/etc/nginx下,编辑nginx.conf,在http配置段中增加如下配置

client_max_body_size 500m #大小自行调节

如果gitlab clone代码提示:

error: RPC failed; result=22, HTTP code = 502

该问题一般都是由于gitlab服务器端上的文件过大,导致客户端下载文件超时,gitlab使用unicorn进行webserver管理,如果客户端下载文件超过30s,unicorn就会结束该线程,因此这里的解决方案就是设置unicorn的超时时间,方法如下:

进入到gitlab服务器的终端目录:/home/git/gitlab/config/下,编辑unicorn.rb

# nuke workers after 30 seconds instead of 60 seconds (the default)

timeout 120

调整该项时间值,即可调整超时时间,具体设置自行调节


关键字词:

相关文章