Git 克隆存储库错误:RPC 失败;结果=56,HTTP 代码 = 200

问题描述:

我已经使用 Git 存储库几年了,但仍然感觉像个新手.. 非常欢迎帮助!

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% ....

错误:

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

git 命令:

The git command:

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

Git 版本:
1.9.4-preview20140929(今天从git小伙伴下载/更新)

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.

我也试过:
如类似帖子所述,将 postBuffer 设置得更高

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

设置 --depth 1 并做一个浅克隆,我以后可以提取其余的

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

设置 --depth 2

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?

非常感谢!

此错误是由于 Git 的 HTTPS 协议造成的.要详细查看错误,您可以设置 GIT_CURL_VERBOSE 环境变量.例如:

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

您的防病毒软件或防火墙可能正在修改传输中的 HTTP 数据包.参见 git clone 因防病毒而失败例子.

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

最后,它可能是一个不可靠的网络连接.我使用的是连接到 Wifi 的 OSX 机器,当我切换到 LAN 连接时问题消失了.

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.