git clone 时出现错误,git 版本 git version 1.7.1,在git 版本(git version 1.7.11 )不存在此问题,这是git 的一个bug,升级git 后解决问题
git clone xxx
Initialized empty Git repository in /data1/xxx.git/
remote: Counting objects: 2228, done.
remote: Compressing objects: 100% (1302/1302), done.
fatal: pack has bad object at offset 31989002: inflate returned -5
fatal: index-pack failed
According to zlib manual, the errors are defined as follow:
#define Z_OK 0
#define Z_STREAM_END 1
#define Z_NEED_DICT 2
#define Z_ERRNO (-1)
#define Z_STREAM_ERROR (-2)
#define Z_DATA_ERROR (-3)
#define Z_MEM_ERROR (-4)
#define Z_BUF_ERROR (-5)
#define Z_VERSION_ERROR (-6)
本文记录了使用特定版本的Git(1.7.1)时遇到的clone错误,并提供了升级Git版本来解决此问题的方法。






I forgot to accept this answer which I caught up on, now. It was a bug, I reported it to the git mailing list, they were quick to fix it, the fix was merged into upstream, and the bug has been fixed in git's releases for several months, now. – UTF-8 Dec 1 '16 at 23:40