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

时间:2017-01-11 13:56:25

标签: git fatal-error

很抱歉给你带来了天才......

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

  1. 我的服务器上有一个克隆的存储库。
  2. 当我在开发机器上更改了一些代码并推送到远程git存储库时,一切运行顺利。
  3. 错误从我从服务器提取数据开始。在服务器上,我命令git pull出现以下错误:
  4. 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. 我尝试了这个措施:fatal: early EOF fatal: index-pack failed 但我从步骤2 git clone --depth 1 <repo_URI>
    2. 得到错误

      错误是:

      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
        
      2. 纪要: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
        
        1. The remote end hung up unexpectedly while git cloning,按照步骤操作,但错误再次出现。以下是我的git配置文件
        2. $ git config -l <​​/ p>

          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
          
          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 version 2.11.0

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

            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
            

            开始新克隆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
            

3 个答案:

答案 0 :(得分:0)

尝试将http的后​​缓冲区扩展为两倍吗?对我有用。

Server Roles

答案 1 :(得分:0)

有时网络连接很重要。您需要确保您是否有正确的互联网连接。我也遇到了同样的问题,并通过改变我的互联网解决了

答案 2 :(得分:0)

您可以通过选择其中之一来增加 extension View { func border(_ color: Color, width: CGFloat, cornerRadius: CGFloat) -> some View { overlay(RoundedRectangle(cornerRadius: cornerRadius).stroke(color, lineWidth: width)) } } 大小来解决此问题:

在终端:

postBuffer

或修改 $ git config --global http.postBuffer 1048576000 文件:

gitconfig

将以下行添加到 $ vim ~/.gitconfig # open gitconfig with ur favorite IDE 文件的末尾:

gitconfig