git pull和clone error fatal:早期EOF; 致命:unpack-objects失败

wux*_*hou 6 git fatal-error

抱歉打扰你的天才..

我遇到一个常见的问题,即堆栈溢出有很多解决方案,但这些解决方案都不适合我.所以最后我别无选择,只能在堆栈溢出时再次请求天才的帮助.

  1. 我的服务器上有一个克隆的存储库.
  2. 当我在我的开发机器上更改了一些代码并推送到远程git存储库时,一切运行顺利.
  3. 错误从我从服务器提取数据开始.在服务器上,我命令git pull出现以下错误:

remote: Counting objects: 66, done. remote: Compressing objects: 100% (65/65), done. Connection to bitbucket.org closed by remote host. fatal: The remote end hung up unexpectedly fatal: early EOF fatal: unpack-objects failed

  1. 我尝试了这个sloution:致命:早期EOF致命:索引包失败 但我从第2步得到错误git clone --depth 1 <repo_URI>

错误是:

Cloning into 'sinolife'... remote: Counting objects: 2783, done. remote: Compressing objects: 100% (2199/2199), done. Connection to bitbucket.org closed by remote host.00 KiB/s
fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

  1. 我也得到一个解决方案,没有足够的交换内存.所以我创建一个交换内存.在开始时交换是0 ...在我配置交换后,free -m结果是:

         total       used       free     shared    buffers     cached
    
    Run Code Online (Sandbox Code Playgroud)

记忆:993 930 63 0 21 57

- /+ buffers/cache:851 142

交换:499 16 483

但我也得到了一些错误.

$git pull

remote: Counting objects: 66, done.
remote: Compressing objects: 100% (65/65), done.
Connection to bitbucket.org closed by remote host.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: unpack-objects failed

$git clone

Cloning into 'sinolife'...
remote: Counting objects: 2783, done.
remote: Compressing objects: 100% (2199/2199), done.
Connection to bitbucket.org closed by remote host.00 KiB/s     
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
  1. 另外,当git克隆时,远程端意外挂断,按照步骤操作,但错误再次出现.以下是我的git配置文件

$ git config -l

http.postbuffer=524288000
user.email= myemail@myemail.com
core.compression=0
core.compression=-1
core.compression=-1
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.compression=-1
core.packedgitlimit=512m
core.packedgitwindowsize=512m
remote.origin.url= my repository
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
pack.deltacachesize=2047m
pack.packsizelimit=2047m
pack.windowmemory=2047m
Run Code Online (Sandbox Code Playgroud)
  1. 我的环境:

    uname -a

    Linux VM-87-192-ubuntu 3.13.0-86-generic#131-Ubuntu SMP 5月12日星期二23:33:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

    git --version

    git版本2.11.0

希望有人可以帮我提一下.

9.问题摘要

我有一个git存储库,已经克隆在服务器中,但是什么时候 git pull

remote: Counting objects: 66, done.
remote: Compressing objects: 100% (65/65), done.
Connection to bitbucket.org closed by remote host.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: unpack-objects failed
Run Code Online (Sandbox Code Playgroud)

什么时候开始新的克隆 git clone

Cloning into 'sinolife'...
remote: Counting objects: 2057, done.
remote: Compressing objects: 100% (1740/1740), done.
Connection to bitbucket.org closed by remote host.00 KiB/s     
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)

Mys*_*Lin 0

尝试将http的postbuffer扩展为两倍?这对我行得通。

git config --global http.postBuffer 1048576000
Run Code Online (Sandbox Code Playgroud)