Git 遇到了 early EOF index-pack failed 问题

今天想 clone 一下 boost 在 github 的 repo,结果在 clone 的过程中遇到了下面的错误。我原本以为是网络原因,今天学校网速废成渣了,很多同学都去网吧撸去了,所以就 retry 了一次。还是出现了下面的错误,然后就不得不 google 去了。

$ git clone https://github.com/boostorg/boost.git
Cloning into 'boost'...
remote: Counting objects: 183543, done.
remote: Compressing objects: 100% (69361/69361), done.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

后来 google 到的参考如下:

特别是第一篇(第一个QA),应该跟我的情况最为符合,不过我尝试了第二个 QA 中Voket
的回答给出的解决方案
。因为我在 Windows
下的 Git
作的这个死。在这里就简单记录一下这个解决方案。

# 为 git 添加配置项,通过下面的命令可以简单完成
# 在这之前可以执行 git config -l 命令看看已有配置项有哪些
git config --add core.compression -1

上面是通过命令来完成的,很方便,当然可以直接修改 .gitconfig 文件(在用户目录下),如果你愿意的话。部分内容如下:

[user]
name = Ggicci
email = ...
[core]
compression = -1

在 [core] 这个 section 里面添加 compression 属性即可。至于它的取值可以参考 Git
Config Manpage
,这个页面你可以通过man
git config
(linux) 或者 git
config --help
(windows)来查看本地版本。

core.compression

An integer -1..9, indicating a default compression level. -1 is the zlib default. 0 means no compression, and 1..9 are various speed/size tradeoffs, 9 being slowest. If set, this provides a default to other compression variables, such as core.loosecompression
and pack.compression. - From Git Manpage

compression 是压缩的意思,从 clone 的终端输出就知道,服务器会压缩目标文件,然后传输到客户端,客户端再解压。取值为 [-1,
9],-1 以 zlib 为默认压缩库,0 表示不进行压缩,1..9 是压缩速度与最终获得文件大小的不同程度的权衡,数字越大,压缩越慢,当然得到的文件会越小。

这之后再尝试了一次 clone,works perfectly :)

$ git clone https://github.com/boostorg/boost.git
Cloning into 'boost'...
remote: Counting objects: 183543, done.
remote: Compressing objects: 100% (69361/69361), done.
remote: Total 183543 (delta 113990), reused 183372 (delta 113844)
Receiving objects: 100% (183543/183543), 67.89 MiB | 162.00 KiB/s, don
e.
Resolving deltas: 100% (113990/113990), done.
Checking connectivity... done.

Git 遇到了 early EOF index-pack failed 问题的更多相关文章

  1. git clone错误 fatal: early EOF fatal: index-pack failed

    最后用ssh的方式解决了,不用http https://blog.csdn.net/fastjack/article/details/79757520 用了以下的方法还是不行 今天想 clone 一下 ...

  2. git遇到error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed failed怎么办?

    答: 将clone地址中的https://替换成git://即可解决 如: 将https://git.openwrt.org/project/luci.git修改为git://git.openwrt. ...

  3. fatal: early EOF fatal: index-pack failed & Git, fatal: The remote end hung up unexpectedly

    https://stackoverflow.com/questions/15240815/git-fatal-the-remote-end-hung-up-unexpectedly https://s ...

  4. [SourceTree] - 使用内置 PuTTY 克隆项目出现 fatal: early EOF 问题之解决

    背景 使用 PuTTY 克隆 Asp.Net Core 项目失败. 错误 git -c filter.lfs.smudge= -c filter.lfs.required=false -c diff. ...

  5. git push origin master出错:error: failed to push some refs to

    1.输入git push origin master 出错:error: failed to push some refs to 那是因为本地没有update到最新版本的项目(git上有README. ...

  6. Some index files failed to download. They have …… or old ones used instead

    问题: 平台:Ubuntu12.04 W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/bin ...

  7. git clone的时候报error: RPC failed; result=18错误

    因业务需求,需要把内网gitlab仓库的地址对外网访问,在gitlab前端配置了一个nginx代理服务器,来实现需求,可以在git clone的时候报error: RPC failed错误 [root ...

  8. eclips git中的add to Index无效解决

    今天在使用eclips git中的add to Index,发现其无效,具体如下 问题描述: 通过export导入一个git java项目 在java工程中新增一个类文件IndicatorCalcTe ...

  9. 在ubuntu更新时,出现错误E: Some index files failed to download, they have been ignored, or old ones used inst

    原文:https://blog.csdn.net/tian_ciomp/article/details/51339635 在ubuntu更新时,出现错误E: Some index files fail ...

随机推荐

  1. Highcharts用函数动态填充静态值

    这种方式适用于其他动态函数模式 series: [{ name: 'Random data', data: (function() { // generate an array of random d ...

  2. u盘安装windows系统

    使用老毛桃为例: 电脑下载老毛桃到自己电脑,插入U盘,制作U盘为启动盘. 四种安装方法: 1.win7能够使用:(win中包含iso的解压文件)解压ISO ----〉 restart win7 --- ...

  3. HDU3874 /HDU3333 树状数组 区间求不重复数和

    Necklace Time Limit: 15000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total S ...

  4. db2数据库新手可能碰到的问题及详解(部分内容来自网络搜索)

    一.db2安装好之后出现乱码,菜单栏呈现方框状,此时选择菜单第五项,点击选择下拉菜单中的最后一项,打开选择标签卡的第三项(字体),如果是无衬线都改为有衬线,如果是有衬线改为无衬线.乱码即可解决(网上一 ...

  5. centos6 LVS-DR模式---分析

    LVS是什么就不多说了. 先上拓扑图 1台LVS   3台Realserver    一个客户端.  环境全部模拟全在内网环境(selinux和iptables关闭) 先简略说一下安装步骤: LVS上 ...

  6. linux中添加ftp用户,并设置相应的权限

    在linux中添加ftp用户,并设置相应的权限,操作步骤如下: 1.环境:ftp为vsftp.被限制用户名为test.被限制路径为/home/test 2.建用户:在root用户下: useradd ...

  7. 20145334赵文豪 《Java程序设计》第4周学习总结

    20145334赵文豪 <Java程序设计>第4周学习总结 教材学习内容总结 第六章知识点总结 1-继承共同行为:如果在程序设计上存在着重复,那就需要修改,可以吧相同的程序代码提升(pul ...

  8. Mysql5.5命令行修改密码

    今天下载了mysql5.5.45免安装版,配置好之后发现mysql默认是没有设置密码的,也就是密码为空. 如果是本机作开发测试用,有无密码倒也无所谓,不过发布在服务器上没有密码肯定是不行的,那就需要设 ...

  9. POJ 1986 Distance Queries(Tarjan离线法求LCA)

    Distance Queries Time Limit: 2000MS   Memory Limit: 30000K Total Submissions: 12846   Accepted: 4552 ...

  10. A trip through the Graphics Pipeline 2011_06_(Triangle) rasterization and setup

    Welcome back. This time we’re actually gonna see triangles being rasterized – finally! But before we ...