The remote end hung up unexpectedly while git cloning

后端 未结 30 2600
旧时难觅i
旧时难觅i 2020-11-22 09:02

My git client repeatedly fails with the following error after trying to clone the repository for some time.

What could be the issue here?

相关标签:
30条回答
  • 2020-11-22 09:42

    Well, I wanted to push a 219 MB solution, but I had no luck with

    git config --global http.postBuffer 524288000
    

    And what's the point of having a 525 MB post buffer anyway? it's silly. So I looked at the git error below:

    Total 993 (delta 230), reused 0 (delta 0)
    POST git-receive-pack (5173245 bytes)
    error: fatal: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
    

    So git want's to post 5 MB, then I made the post buffer 6 MB, and it works

    git config --global http.postBuffer 6291456
    
    0 讨论(0)
  • 2020-11-22 09:43

    SOLVED WITH WIFI Router Setting :

    I got same issue when I am in wifi with Settings PPPoE(auto login by wifi router).

    Git download speed is very slow 15kb.

    packet_write_wait: Connection to 17.121.133.16 port 22: Broken pipe fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

    Solution : 1. Changed setting to Dynamic IP, reboot wifi router. 2. From web browser login to Internet service provider portal (do not configure PPPoE , auto login from the wifi router).

    After changing Git download speed is 1.7MiB.

    0 讨论(0)
  • 2020-11-22 09:44

    I had the same issue and it was related with a bad internet connection, so after try with some git configs, i've just disconnected from my network and connected again and it works!.

    It seems that after connection lost (or the action that fires this situation), git is stuck.

    I hope that it could be a help for someone more here.

    Best,

    0 讨论(0)
  • 2020-11-22 09:45

    I got solution after using below command:

    git repack -a -f -d --window=250 --depth=250

    0 讨论(0)
  • 2020-11-22 09:48

    I was facing this issue when cloning data (via HTTP) from remote git repo hosted on AWS EC2 instance managed by elastic beanstalk. The cloning itself was also done on AWS EC2 instance.

    I tried all aforementioned solutions and their combinations:

    • setting git's http.postBuffer
    • settinghttp.maxrequestbuffer
    • turning off git compression and trying "shallow" git clone and then git fetch --unshallow - see fatal: early EOF fatal: index-pack failed
    • tunning GIT memory settings - packedGitLimit et al, see here: fatal: early EOF fatal: index-pack failed
    • tunning nginx configuration - setting client_max_body_size to both big value and 0 (unlimited); setting proxy_request_buffering off;
    • setting options single-request in /etc/resolv.conf
    • throttling git client throughput with trickle
    • using strace for tracing git clone
    • considering update of git client

    After all of this, I was still facing the same issue over and over again, until I found that issue is in Elastic Load Balancer (ELB) cutting the connection. After accessing the EC2 instance (the one hosting git repo) directly instead of going through ELB I've finally managed to clone git repo! I'm still not sure which of ELB (timeout) parameters is responsible for this, so I still have to do some research.

    UPDATE

    It seems that changing Connection Draining policy for AWS Elastic Load Balancer by raising timeout from 20 seconds to 300 seconds resolved this issue for us.

    The relation between the git clone errors and "connection draining" is strange and not obvious to us. It might be that connection draining timeout change caused some internal changes in ELB configuration that fixed the issue with premature connection closing.

    This is the related question on AWS forum (no answer yet): https://forums.aws.amazon.com/thread.jspa?threadID=258572

    0 讨论(0)
  • 2020-11-22 09:49

    I also had the same problem.The reason for this problem is as Kurtis's descriptions about GNUTLS.

    If you have the same reason and your system is Ubuntu, you can solve this problem by installing the latest version of git from ppa:git-core/ppa.The commands are as below.

    sudo add-apt-repository ppa:git-core/ppa
    sudo apt-get update
    sudo apt-get git
    
    0 讨论(0)
提交回复
热议问题