Git clone repository error: RPC failed; result=56, HTTP code = 200

若如初见. 提交于 2019-11-26 16:49:44

问题


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!


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


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




回答5:


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.




回答6:


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.




回答7:


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!



来源:https://stackoverflow.com/questions/26197171/git-clone-repository-error-rpc-failed-result-56-http-code-200

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!