The remote end hung up unexpectedly while git cloning

后端 未结 30 2568
旧时难觅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:30

    This worked for me, setting up Googles nameserver because no standard nameserver was specified, followed by restarting networking:

    sudo echo "dns-nameservers 8.8.8.8" >> /etc/network/interfaces && sudo ifdown venet0:0 && sudo ifup venet0:0
    
    0 讨论(0)
  • 2020-11-22 09:31

    If you are using https and you are getting the error.

    I used https instead of http and it solved my problem

    git config --global https.postBuffer 524288000
    
    0 讨论(0)
  • 2020-11-22 09:32

    I got the same issue, I fixed this with trial and error method. I changed the core.compression value until it works.

    I started with "git config --global core.compression 1" after 3 attempts

    "git config --global core.compression 4" worked for me.

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

    I had a similar problem, but with a bamboo job. Bamboo was failing doing a local clone (local but over an SSH proxy) of a cached repository, I deleted the cache and after that it worked, but any time it tries to clone from the local cache there is a failure. Seems like a problem with bamboo's version of the SSH proxy not git per se.

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

    Same error with Bitbucket. Fixed by

    git config --global http.postBuffer 500M
    git config --global http.maxRequestBuffer 100M
    git config --global core.compression 0
    
    0 讨论(0)
  • 2020-11-22 09:33

    This solved my problem:

    git clone --depth=20 https://repo.git -b master
    
    0 讨论(0)
提交回复
热议问题