If you are trying to download large source code from git using “git clone” command and your internet is unstable or got disconnected before downloading is complete, you may see an error as below, [ Note: we got an error when we tried to download large beagleboard kernel repository from github ]
$ git clone https://github.com/beagleboard/linux.git Cloning into 'linux'... remote: Enumerating objects: 385, done. remote: Counting objects: 100% (385/385), done. remote: Compressing objects: 100% (134/134), done. Receiving objects: 2% (167393/7240238), 64.43 MiB | 248.00 KiB/s error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function. fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed
Please note, this solution worked for us since our network had became unstable and got disconnected in middle of download. If you have a good internet connection, you can reattempt the git clone and it should just complete successfully.
Second solution, you can try to use –depth=1 as mentioned in our another post “How to clone a large git repository“
Leave us a comment if this didn’t solved your problem and also mention scenario where you sees this error and we will update this post with further solutions.