3

When I clone a repository from GitHub, I met this error. I have tried a lot of times and I never succeed.

git clone https://github.com/cocos2d/cocos2d-x.git
Cloning into 'cocos2d-x'...
remote: Counting objects: 397914, done.
remote: Compressing objects: 100% (19/19), done.
error: RPC failed; result=56, HTTP code = 200 MiB | 0 bytes/s      
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

I have taken a look at this question, but I don't have Avast installed. How can I solve it?

Edit:

According to this question , I have increased my git buffer by running this command git config --global http.postBuffer 2M.

I am using Mac OSX, under zsh.

Community
  • 1
  • 1
einverne
  • 6,454
  • 6
  • 45
  • 91
  • Do you get the same error when cloning the same repository using ssh url? `git clone git@github.com:cocos2d/cocos2d-x.git` – Ionică Bizău Oct 16 '15 at 12:36
  • After I tried to set git buffer, It seems worked. – einverne Oct 18 '15 at 04:13
  • @einverne So please post this as self-answer. – user11153 Oct 19 '15 at 08:38
  • [Related](http://stackoverflow.com/questions/2702731/git-fails-when-pushing-commit-to-github). Probably you have some large files (larger than `http.postBuffer`) in your repo. – user11153 Oct 19 '15 at 11:35
  • Possible duplicate of [git push error: RPC failed; result=56, HTTP code = 0](http://stackoverflow.com/questions/22005259/git-push-error-rpc-failed-result-56-http-code-0) – Mephiztopheles Oct 17 '16 at 14:35

1 Answers1

4

I have tried for several times after I set git buffer, as I mentioned in the question, it seems work now.

So if you met this error, run this command:

git config --global http.postBuffer 2M

and then try again for some times.

Reference:

git push error: RPC failed; result=56, HTTP code = 0

Community
  • 1
  • 1
einverne
  • 6,454
  • 6
  • 45
  • 91