Git Clone时报 "fatal: index-pack failed error: RPC failed; result=18, HTTP code = 200"原因文件过大需要服务端配置一下

环境说明:远程仓库为gitlab,centos系统 
1.问题描述: 
最近在使用Git clone远程仓库代码到本地时,出现如下错误:

git.exe clone --progress -v "http://192.168.13.21/bda/ma_bang_wang.git" "C:\Users\Administrator\Desktop\ma_bang_wang"

Cloning into 'C:\Users\Administrator\Desktop\ma_bang_wang'...
POST git-upload-pack (250 bytes)
remote: 对象计数中: 4972, 完成.
remote: 压缩对象中: 100% (3565/3565), 完成.
fatal: early EOF
fatal: The remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; result=18, HTTP code = 200
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

2.问题分析: 
当我们从git仓库clone或者push大量数据时(如1G),clone或者push时间会超过默认值为30s。 
错误日志在gitlab安装目录下,如下是我的日志路径:

/home/git/gitlab/log/unicorn.stderr.log
  • 1
  • 1

日志信息: 
这里写图片描述
3.解决办法: 
修改gitlab unicorn配置文件unicorn.rb(位置:/home/git/gitlab/config下)中的timeout,加大timeout值即可。

修改后,重启gitlab服务。


==========================================================================================

==========================================================================================

==========================================================================================


gitlab报错 "fatal: index-pack failed error: RPC failed; result=18, HTTP code = 200",如下图

 

这个问题网上有些人给出这样的解决方法是不行的,

所谓:Git config --globalhttp.postBuffer 24288000

git config --list

最有代表的是这个帖子:http://blog.csdn.net/ijibu/article/details/10830853

http://stackoverflow.com/questions/17683295/git-bash-error-rpc-failed-result-18-htp-code-200b-1kib-s

 

解决方法参考:

http://blog.csdn.net/nydia_xiangxiang/article/details/45058505

 

gitlab的安装目录文件结构

Git Clone时报

 

需要查看gitlab的报错信息在/gitlab/log/unicorn.stderr.log

 

很显然说超时了,那么修改默认配置即可,找到配置文件/config/unicorn.rb

timeout 240

这个改大即可

 

重启gitlab服务

service gitlab restart


你可能感兴趣的:(开发工具)