Gitlab整理汇总(安装、非22端口克隆、升级及遇到问题、备份恢复)
整理汇总了gitlab安装过程中遇到的各种问题,gitlab的多种clone方式、夸大版本升级问题及常规的备份恢复需要注意事项等,强烈建议收藏,知识点多多~~~
阅读更多部门使用的代码管理仓库是gitlab,随着业务发展,代码量也越来越大,到目前已经大于100M,今天新入职员工全量拉取代码时候报错,查找原因是因为代码仓库太大导致拉取超时。 这里记录下处理过程
fatal: early EOF
fatal: The remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; result=18, HTTP code = 200
因为这边使用的docker搭建的gitlab,处理方式有点不同
必须先进入到gitlab容器中去操作,重启 gitlab 也必须是进入到docker 容器中重启,
否则从服务器直接重启容器会导致配置丢失,恢复成默认值
之前修改过gitlab前端nginx的 client_max_body_size 大小,确保上传下载超大文件的可能性
vi /etc/nginx/nginx.conf
client_max_body_size 50M;
## check and reload nginx config
nginx -t
nginx -s reload
## need to enter gitlab container firstly
## then edit the config
vi config/unicorn.rb
timeout 300
## then restart gitlab in container
## remember that must be in container
/etc/init.d/gitlab restart
另外建议也修改下本地 http.postBuffer 参数
## modify in commandline
git config --global http.postBuffer 524288000
## check config list
git config --list
最后重新拉取,没有问题