Not able to clone large repo code on git

前端 未结 3 1731
死守一世寂寞
死守一世寂寞 2021-01-12 10:30

I\'m getting an error like :-

Cloning into \'large-repository\'...
remote: Counting objects: 20248, done.
remote: Compressing objects: 100% (10204/10204), do         


        
3条回答
  •  爱一瞬间的悲伤
    2021-01-12 10:36

    That looks like a curl error, typical of a slow internet connection which closes too soon.

    As seen here, try a shallow clone (or switch to ssh)

    git clone https://ramweexcel@bitbucket.org/weexcel1/higher-education-haryana.g‌​it --depth 1
    

    Even then, as I documented in 2011, you might need to raise the http.postBuffer

    git config --global http.postBuffer 524288000
    

    But the idea remains: starting with one commit depth can help.

    From there, you can gradually increase the depth:

    git fetch --depth=
    

    And, after a few iteration:

    git fetch --unshallow
    

提交回复
热议问题