21

I have been using a Git repository for a couple years and still feel like a newb.. help is most welcome!

It starts cloning for a while:

remote: Counting objects: 22394<br>
remote: Compressing objects: 100% (12314/12314)<br>
Receiving objects: 32% ....

The error:

error: RPC failed; result=56, HTTP code = 200<br>
fatal: The remote end hung up unexpectedly<br>
fatal: early EOF<br>
fatal: index-pack failed

The git command:

git clone https://[username]:[password]@github.com/MegaWorldStudios/OmegatechV2.git "C:\OmegatechV2"

Git Version:
1.9.4-preview20140929 (downloaded/updated today from the git fellas)

I found questions such as this one, but none of the answers solves the problem.

I've also tried:
Setting the postBuffer higher as mentioned from similar posts

git config http.postBuffer 524288000<br>
git config --global http.postBuffer 524288000

Setting --depth 1 and doing a shallow clone that I can later pull the rest

Setting --depth 2

error: RPC failed; result=18, HTTP code = 200
Cloning from a branch other than the main branch
Reinstalling the software and updating

What does this infernal error mean and what's the fix/workaround?

Thanks so much in advance!

iammilind
  • 68,093
  • 33
  • 169
  • 336
pixelknight
  • 243
  • 1
  • 2
  • 7
  • Anti-Virus? http://stackoverflow.com/questions/25442734/git-clone-error-rpc-failed-result-56-http-code-200 – Andrew C Oct 04 '14 at 21:13
  • 2
    Could you try using an ssh url? (if you can add your public key to this private repo) `git clone git@github.com:MegaWorldStudios/OmegatechV2` – VonC Oct 05 '14 at 04:56
  • Possibly relevant http://askubuntu.com/questions/186847/error-gnutls-handshake-falied-when-connecting-to-https-servers/187199#187199 – gknicker Jan 24 '15 at 02:34

7 Answers7

17

This error occurs due to Git's HTTPS protocol. To view the error in detail, you can set the GIT_CURL_VERBOSE environment variable. For example:

$ GIT_CURL_VERBOSE=1 git pull

Your Antivirus or Firewall could be modifying the HTTP packets in transit. See git clone failed due to antivirus for example.

Finally, it could be an unreliable network connection. I am using an OSX machine connected to Wifi, and the problem disappeared when I switch to a LAN connection.

Community
  • 1
  • 1
Hanxue
  • 12,243
  • 18
  • 88
  • 130
  • 1
    Same thing happened to me, and it turned out a VPN client (that was off at the time) was messing with the traffic somehow. – hermitt Dec 03 '14 at 16:58
  • I had the same problem but was solved reinstalling cntlm – imbr Jan 16 '15 at 16:47
  • I had the exact same problem on wifi. Unbeliveable but changing to network cable it started working... – Kristóf Dombi Mar 10 '15 at 11:42
  • After 3 days of straggling and trying any workaround out there, our IT guys agreed to reboot their F5 load balancer - and voilà - everything is back to normal ! – Noam Manos Jul 03 '16 at 15:36
  • what the actual... ? setting `GIT_CURL_VERBOSE` actually removed the issue entirely for me. – Chaim Eliyah Sep 14 '18 at 23:39
3

I faced the similar error. Tried to configure http.postBuffer but it didn't work.

I found about the same error (with solution) over here: Git Clone Fails - error: RPC failed; result=56, HTTP code = 200

As suggested in the above link, I solved it out by using SSH to perform the clone.

Here is a good tutorial on how to Setup SSH for Git.

Mukesh Chapagain
  • 25,063
  • 15
  • 119
  • 120
2

Git clone with a HTTPS url is not supported by the git binary shipped currently in debian and ubuntu. See this answer for a workround.

Community
  • 1
  • 1
gogstad
  • 3,607
  • 1
  • 29
  • 32
1

This is a problem specific to Atlassian Stash and Mac OSX git client. Workaround:

  1. Install HomeBrew following the instructions here: http://brew.sh/

  2. Follow the solution provided in this gist courtesy of entropiae:

    $ brew remove git
    $ brew remove curl
    
    $ brew install openssl
    $ brew install --with-openssl curl
    $ brew install --with-brewed-curl --with-brewed-openssl git
    

    (this installs a working binary in eg /usr/local/Cellar/git/2.10.2/bin/git)

  3. Tell your IDE to use that binary, or you can run it from the command line to clone / push etc

Matt and Neil
  • 157
  • 11
0

I faced the same issue on Mac OSX when attempting push my code to bitbucket. I made 2 following steps to resolve the issue:

  1. Increase the buffer with command: git config http.postBuffer 524288000

  2. Change protocol from HTTPS to SSH. This is the main key to resolve the issue. You can refer to https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html for more information.

Luan Vo
  • 221
  • 3
  • 8
0

Posting here because this was one of the first Google results for 'RPC failed; result=56, HTTP code = 200'.

I tried many different things to get this issue resolved. I tried compiling git from source, adding gitconfig settings, and I even tried multiple configurations of my GitLab server. None of these things worked. I didn't understand why I could clone a repo successfully on the same subnet as my git server, but couldn't over a remote subnet (connected by site-to-site VPN).

The issue ended up being my firewall. I white-listed the client and everything started working. Temporarily placing the client in a DMZ may also be a quick fix.

zachzins
  • 28
  • 5
0

I faced the same issue while cloning a very large repository. I tried with configuring http.postBuffer, but it did not work for me. Finally, it was issue with my internet.

I connected my laptop to a high speed Internet and it cloned successfully!

Tarun Chawla
  • 321
  • 1
  • 2
  • 11