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

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值