Git 错误:RPC 失败;结果=55,HTTP 代码 = 200
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20833932/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git error: RPC failed; result=55, HTTP code = 200
提问by Yishu Fang
What's the matter with git?
git 怎么了?
$ git push
Counting objects: 1431, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1326/1326), done.
Writing objects: 100% (1429/1429), 131.94 MiB | 15.41 MiB/s, done.
Total 1429 (delta 630), reused 0 (delta 0)
error: RPC failed; result=55, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
回答by mrtimuk
We experienced this issue recently but none of the above solved it. In the end we pushed patches a few at a time (binary chop) until we found that one was causing the problem.
我们最近遇到了这个问题,但以上都没有解决它。最后,我们一次推送几个补丁(二进制印章),直到我们发现一个是导致问题的原因。
The version of Git on the server was older than our local Git and did not support one of the headers in the commit.
服务器上的 Git 版本比我们本地的 Git 旧,并且不支持提交中的标头之一。
An easy way to see if this affects you is to run git fsck
in your repository directory. This will report any potential issues.
查看这是否影响您的一种简单方法是git fsck
在您的存储库目录中运行。这将报告任何潜在问题。
回答by Damian Nadales
In my case this was due to a GNUtls error, which showed up after running
GIT_CURL_VERBOSE=1 git clone https:<URL>
The workaround that worked for me was to build git using the openssl library instead of gnutls. For Ubuntu systems this linkoffers a way of achieving this.
对我有用的解决方法是使用 openssl 库而不是 gnutls 来构建 git。对于 Ubuntu 系统,此链接提供了实现此目的的方法。
It is worth noting that I'm behind a company proxy, and this may be triggering the problem.
值得注意的是,我支持公司代理,这可能会引发问题。
回答by cuasodayleo
Change protocol git from https to ssh will resolve this problem. This is guide using for bitbucket https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git
将协议 git 从 https 更改为 ssh 将解决此问题。这是用于 bitbucket 的指南 https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git
回答by Daniel
Some info on the error here: https://confluence.atlassian.com/pages/viewpage.action?pageId=301663267
关于这里错误的一些信息:https: //confluence.atlassian.com/pages/viewpage.action?pageId=301663267
(from the linked article) Try this command to get more info about your error:
(来自链接的文章)尝试此命令以获取有关您的错误的更多信息:
GIT_CURL_VERBOSE=1 git push
回答by Chris Sherlock
This is an odd error. I'm actually getting the same when I push a large repo to GitHub. However, error 55 is a CURL error, it's basically a problem transmitting data over the network. The kicker is that if the data wasn't sent correctly, how does CURL get a 200 response?
这是一个奇怪的错误。当我将一个大型 repo 推送到 GitHub 时,我实际上得到了相同的结果。但是,错误 55 是 CURL 错误,它基本上是通过网络传输数据的问题。关键是如果数据没有正确发送,CURL 如何获得 200 响应?
My only conclusion is I'm using a proxy and that the proxy is returning a 200 response to git, but the proxy itself had issues sending the data. I'm afraid this is an educated guess, but if you can use SSH then you'll obviously bypass the dodgy proxy so I'd say this is the best workaround.
我唯一的结论是我正在使用代理并且代理正在向 git 返回 200 响应,但代理本身在发送数据时存在问题。恐怕这是一个有根据的猜测,但是如果您可以使用 SSH,那么您显然会绕过狡猾的代理,所以我会说这是最好的解决方法。