git服务器无法clone,出现remote: error: inflate: data stream error (incorrect data check)错误解决方法

现象:突然有一天,gitolite服务器的某个项目,远程无法clone,错误如下:

$ git clone git@XXXX:XXX.git
Cloning into ‘XXXX'...

remote: Counting objects: 23121, done.
remote: error: inflate: data stream error (incorrect data check)
remote: error: failed to read object 1c14f7fab9287c0746119a6c1de788f9b8e8bd93 at offset 580407 from ./objects/pack/pack-1f30148747d0ec1d3266443c6303ec3e775defe8.pack
remote: Compressing objects: 100% (10143/10143), done.
error: inflate: data stream error (incorrect data check)MiB/s   
fatal: pack has bad object at offset 9882705: inflate returned -3
fatal: index-pack failed


按照网上的教程处理,没有效果。

经过多方尝试,过程是:
1 登录到gitolite(linux)服务器上,尝试本地clone,失败
2 复制该工程的 xxx.git源目录到 /tmp/下,然后将其作为源进行clone,成功
3 备份原来的.git源目录,复制/tmp/下的源目录回原本位置,记得需要修改own属性:
   # chown -R git /data/git/repo/xxx.git
4 本地测试clone,成功
5 远程测试clone,成功

问题解决

你可能感兴趣的:(综合技术)