现在的位置: 首页 > 综合 > 正文

[git]error: RPC failed; result=55, HTTP code = 0

2013年11月06日 ⁄ 综合 ⁄ 共 7535字 ⁄ 字号 评论关闭

https://confluence.atlassian.com/pages/viewpage.action?pageId=301663267

 

Symptoms

When trying to push to Bitbucket using Git and https, the following errors are encountered

Counting objects: ###, done.
Delta compression using up to # threads.
Compressing objects: 100% (###/###), done.
Writing objects: 100% (###/###), ##.## MiB | ##.## MiB/s, done.
Total ### (delta 64), reused 0 (delta 0)
error: RPC failed; result=55, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

Diagnosis

The line that is relevant here is 

error: RPC failed; result=55, HTTP code =
0

Specifically, the 'result=55' portion. This is the error code coming from libcurl, the underlying library used in http communications with Git. From the libcurl
documentation
, a result code of 55 means:

CURLE_SEND_ERROR (55)
	Failed sending network data.

Cause

This can be caused by a variety of network related issues or even the Bitbucket service itself. It essentially means that the connection was dropped unexpectedly. Things to check would be to attempt the push from a machine on a 'clean' network outside of
any corporate firewalls or proxies. Check all proxy servers to ensure they are properly moving SSL data and are fully permitted to complete. 

To Help the Bitbucket Support Team Troubleshoot

To help troubleshoot this issue, try running the push with the command

GIT_CURL_VERBOSE=1
git push

This will run the push command with the underlying libcurl library set to verbose mode. This will output a lot of data on the command line when running the push. Copy and paste the information output into a support ticket to help the Bitbucket team troubleshoot what
may be wrong in your specific case. 

The following is an example of a request that has completed properly:

Marcus-MBP:public_test mbertrand$ GIT_CURL_VERBOSE=1 git push
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* About to connect() to bitbucket.org port 443 (#0)
*   Trying 207.223.240.181...
* Connected to bitbucket.org (207.223.240.181) port 443 (#0)
* Connected to bitbucket.org (207.223.240.181) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /opt/local/share/curl/curl-ca-bundle.crt
  CApath: none
* SSL connection using AES256-SHA
* Server certificate:
* 	 subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=3928449; street=375 Alabama St Ste 325; postalCode=94110; C=US; ST=CA; L=San Francisco; O=Atlassian, Inc.; CN=bitbucket.org
* 	 start date: 2012-01-03 00:00:00 GMT
* 	 expire date: 2014-03-12 12:00:00 GMT
* 	 subjectAltName: bitbucket.org matched
* 	 issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Assurance EV CA-1
* 	 SSL certificate verify ok.
> GET /username/public_test.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.7.11.2
Host: bitbucket.org
Accept: */*
Pragma: no-cache
< HTTP/1.1 401 Unauthorized
< Server: nginx/1.0.6
< Date: Thu, 13 Sep 2012 19:54:08 GMT
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Bitbucket.org HTTP", nonce="xxxxxxxxx", qop="auth", opaque="xxxxxxxx"
< 
* Ignoring the response-body
* Connection #0 to host bitbucket.org left intact
* Issue another request to this URL: 'https://username@bitbucket.org/username/public_test.git/info/refs?service=git-receive-pack'
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* Re-using existing connection! (#0) with host (nil)
* Connected to (nil) (207.223.240.181) port 443 (#0)
* Server auth using Digest with user 'username'
> GET /username/public_test.git/info/refs?service=git-receive-pack HTTP/1.1
Authorization: Digest username="username", realm="Bitbucket.org HTTP", nonce="xxxxxxxxx", uri="/username/public_test.git/info/refs?service=git-receive-pack", cnonce="xxxxxx", nc=00000001, qop="auth", response="xxxxxxx", opaque="xxxxxxxxxx"
User-Agent: git/1.7.11.2
Host: bitbucket.org
Accept: */*
Pragma: no-cache
< HTTP/1.1 401 Unauthorized
< Server: nginx/1.0.6
< Date: Thu, 13 Sep 2012 19:54:08 GMT
< Transfer-Encoding: chunked
* Authentication problem. Ignoring this.
< WWW-Authenticate: Digest realm="Bitbucket.org HTTP", nonce="xxxxxxxxx", qop="auth", opaque="xxxxxxxxx"
* The requested URL returned error: 401
* Closing connection #0
Password for 'https://username@bitbucket.org': 
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* About to connect() to bitbucket.org port 443 (#0)
*   Trying 207.223.240.181...
* Connected to bitbucket.org (207.223.240.181) port 443 (#0)
* Connected to bitbucket.org (207.223.240.181) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /opt/local/share/curl/curl-ca-bundle.crt
  CApath: none
* SSL re-using session ID
* SSL connection using AES256-SHA
* Server certificate:
* 	 subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=3928449; street=375 Alabama St Ste 325; postalCode=94110; C=US; ST=CA; L=San Francisco; O=Atlassian, Inc.; CN=bitbucket.org
* 	 start date: 2012-01-03 00:00:00 GMT
* 	 expire date: 2014-03-12 12:00:00 GMT
* 	 subjectAltName: bitbucket.org matched
* 	 issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Assurance EV CA-1
* 	 SSL certificate verify ok.
* Server auth using Digest with user 'username'
> GET /username/public_test.git/info/refs?service=git-receive-pack HTTP/1.1
Authorization: Digest username="username", realm="Bitbucket.org HTTP", nonce="xxxxxxx", uri="/username/public_test.git/info/refs?service=git-receive-pack", cnonce="xxxxxxxx", nc=00000001, qop="auth", response="xxxxxxxx", opaque="xxxxxxx"
User-Agent: git/1.7.11.2
Host: bitbucket.org
Accept: */*
Pragma: no-cache
< HTTP/1.1 200 OK
< Server: nginx/1.0.6
< Date: Thu, 13 Sep 2012 19:54:15 GMT
< Content-Type: application/x-git-receive-pack-advertisement
< Transfer-Encoding: chunked
< 
* Connection #0 to host bitbucket.org left intact
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 921 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* About to connect() to bitbucket.org port 443 (#0)
*   Trying 207.223.240.181...
* connected
* Connected to bitbucket.org (207.223.240.181) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /opt/local/share/curl/curl-ca-bundle.crt
  CApath: none
* SSL re-using session ID
* SSL connection using AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
* 	 subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=3928449; street=375 Alabama St Ste 325; postalCode=94110; C=US; ST=CA; L=San Francisco; O=Atlassian, Inc.; CN=bitbucket.org
* 	 start date: 2012-01-03 00:00:00 GMT
* 	 expire date: 2014-03-12 12:00:00 GMT
* 	 subjectAltName: bitbucket.org matched
* 	 issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Assurance EV CA-1
* 	 SSL certificate verify ok.
* Server auth using Digest with user 'username'
> POST /username/public_test.git/git-receive-pack HTTP/1.1
Authorization: Digest username="username", realm="Bitbucket.org HTTP", nonce="xxxxxxx", uri="/username/public_test.git/git-receive-pack", cnonce="xxxxx", nc=00000002, qop="auth", response="xxxxxxx", opaque="xxxxxxxx"
User-Agent: git/1.7.11.2
Host: bitbucket.org
Accept-Encoding: deflate, gzip
Content-Type: application/x-git-receive-pack-request
Accept: application/x-git-receive-pack-result
Content-Length: 1057
* upload completely sent off: 1057 out of 1057 bytes
< HTTP/1.1 200 OK
< Server: nginx/1.0.6
< Date: Thu, 13 Sep 2012 19:54:22 GMT
< Content-Type: application/x-git-receive-pack-result
< Transfer-Encoding: chunked
< 
* Connection #0 to host bitbucket.org left intact
remote: bb/acl: username is allowed. accepted payload.
To https://username@bitbucket.org/username/public_test.git
   8d8254e..166a203  master -> master
* Closing connection #0

Workaround

If after checking all connections and proxy configurations the connection still fails consistently, please report the information above to support. Then switch to SSH. We have a guide to getting it setup for Git at Set
up SSH for Git
. If you should run into any configuration issues while setting up SSH, please refer to our SSH Troubleshooting guide.

Resolution

There may not be a solution for all users who encounter this issue as it is network related and can be affected by a variety of factors outside of the Bitbucket site's control.

抱歉!评论已关闭.