git

Not able to clone large repo code on git


I'm getting an error like :-

Cloning into 'large-repository'...
remote: Counting objects: 20248, done.
remote: Compressing objects: 100% (10204/10204), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining 
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

Solution

  • git config --global http.postBuffer 524288000
    
    git clone repo_url --depth 1
    

    I have followed above steps and finally I have successfully cloned my code.