在尝试克隆存储库时,我收到以下错误: -
error: RPC failed; result=52, HTTP code = 0
如果使用此信息,我正在使用https连接。
我尝试过: -
git config --global http.postBuffer 524288000
这没有用。
其他详情: - 操作系统 - Ubuntu 14.04, Git Repo - BitBucket, git版本 - 1.9.1
编辑: -
结果来自: - GIT_CURL_VERBOSE = 1 GIT_TRACE_PACKET = 1 git clone URL
GIT_CURL_VERBOSE=1 GIT_TRACE_PACKET=1 git clone <https:url>
Cloning into 'reponame'...
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
* Trying 104.192.143.2...
* Connected to bitbucket.org (104.192.143.2) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* server certificate verification OK
* common name: bitbucket.org (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject:
* start date: Tue, 03 May 2016 00:00:00 GMT
* expire date: Fri, 22 Jun 2018 12:00:00 GMT
* issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 Extended Validation Server CA
* compression: NULL
* cipher: AES-128-CBC
* MAC: SHA256
> GET reponame.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.9.1
Host: bitbucket.org
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Basic realm="Bitbucket.org HTTP"
< Content-Type: text/plain
< Date: Tue, 15 Nov 2016 09:31:20 GMT
< X-Git-Mode: pull
< Connection: Keep-Alive
< Content-Length: 12
<
* Ignoring the response-body
* Connection #0 to host bitbucket.org left intact
* Issue another request to this URL: '<url here>/info/refs?service=git-upload-pack'
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* Found bundle for host bitbucket.org: 0xb5e5f0
* Re-using existing connection! (#0) with host bitbucket.org
* Connected to bitbucket.org (104.192.143.2) port 443 (#0)
* Server auth using Basic with user 'user_name'
> GET /reponame/info/refs?service=git-upload-pack HTTP/1.1
Authorization: Basic c3JlZWthbnRoX25jOg==
User-Agent: git/1.9.1
Host: bitbucket.org
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 401 Unauthorized
* Server nginx/1.6.2 is not blacklisted
< Server: nginx/1.6.2
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="Bitbucket.org HTTP"
< Vary: Accept-Encoding
< Cache-Control: no-cache
< Content-Type: text/plain
< X-Usage-Output-Ops: 0
< Content-Encoding: gzip
< Strict-Transport-Security: max-age=31536000
< Date: Tue, 15 Nov 2016 09:31:21 GMT
< X-Usage-User-Time: 0.009855
< X-Usage-System-Time: 0.003753
< Transfer-Encoding: chunked
< X-View-Name: bitbucket.gitweb.application
< Connection: Closed
< X-Usage-Input-Ops: 0
<
* Closing connection 0
Password for <url here>
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* Hostname was found in DNS cache
* Trying 104.192.143.2...
* Connected to bitbucket.org (104.192.143.2) port 443 (#1)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* SSL re-using session ID
* server certificate verification OK
* common name: bitbucket.org (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject:
* start date: Tue, 03 May 2016 00:00:00 GMT
* expire date: Fri, 22 Jun 2018 12:00:00 GMT
* issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 Extended Validation Server CA
* compression: NULL
* cipher: AES-128-CBC
* MAC: SHA256
* Server auth using Basic with user 'username'
> GET /reponame.git/info/refs?service=git-upload-pack HTTP/1.1
Authorization: Basic c3JlZWthbnRoX25jOnNyZWVrYW50aGhlcmU=
User-Agent: git/1.9.1
Host: bitbucket.org
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 200 OK
< bbr1wikiprivate: 0
< bbr1private: 1
* Server nginx/1.6.2 is not blacklisted
< Server: nginx/1.6.2
< Cache-Control: no-cache
< Content-Type: application/x-git-upload-pack-advertisement
< X-Usage-Output-Ops: 0
< bbr1reposlug: reponame
< bbr1hasadmin: 0
< bbr1scm: git
< Strict-Transport-Security: max-age=31536000
< Date: Tue, 15 Nov 2016 09:31:37 GMT
< X-Usage-User-Time: 0.016693
< X-Usage-System-Time: 0.004990
< bbuserid: 5740059
< Transfer-Encoding: chunked
< bbr1hasread: 1
< bbr1ownerid: 5057159
< bbr1issuesprivate: 0
< bbr1haswrite: 1
< bbr1size: 896834063
< X-View-Name: bitbucket.gitweb.application
< Connection: Closed
< bbusername: user_name
< X-Usage-Input-Ops: 0
< bbr1owner: reponame
< bbr1id: 15508590
<
* Closing connection 1
packet: git< # service=git-upload-pack
packet: git< 0000
packet: git< be49ca012c0752031ced115cdad0af02931de2d0 HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2.7.4.1.g5468f9e
packet: git< 36b228cb4d33d30cd536e7faddca8dc9c32e99fa refs/heads/develop
packet: git< be49ca012c0752031ced115cdad0af02931de2d0 refs/heads/master
packet: git< 0000
packet: git> be49ca012c0752031ced115cdad0af02931de2d0 HEAD
packet: git> 36b228cb4d33d30cd536e7faddca8dc9c32e99fa refs/heads/develop
packet: git> be49ca012c0752031ced115cdad0af02931de2d0 refs/heads/master
packet: git> 0000
packet: fetch-pack< be49ca012c0752031ced115cdad0af02931de2d0 HEAD
packet: fetch-pack< 36b228cb4d33d30cd536e7faddca8dc9c32e99fa refs/heads/develop
packet: fetch-pack< be49ca012c0752031ced115cdad0af02931de2d0 refs/heads/master
packet: fetch-pack< 0000
packet: fetch-pack< be49ca012c0752031ced115cdad0af02931de2d0 HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2.7.4.1.g5468f9e
packet: fetch-pack< 36b228cb4d33d30cd536e7faddca8dc9c32e99fa refs/heads/develop
packet: fetch-pack< be49ca012c0752031ced115cdad0af02931de2d0 refs/heads/master
packet: fetch-pack< 0000
packet: fetch-pack> want be49ca012c0752031ced115cdad0af02931de2d0 multi_ack_detailed no-done side-band-64k thin-pack ofs-delta agent=git/1.9.1
packet: fetch-pack> want 36b228cb4d33d30cd536e7faddca8dc9c32e99fa
packet: fetch-pack> want be49ca012c0752031ced115cdad0af02931de2d0
packet: fetch-pack> 0000
packet: fetch-pack> done
packet: fetch-pack> 0000
packet: git< 007fwant be49ca012c0752031ced115cdad0af02931de2d0 multi_ack_detailed no-done side-band-64k thin-pack ofs-delta agent=git/1.9.10032want 36b228cb4d33d30cd536e7faddca8dc9c32e99fa0032want be49ca012c0752031ced115cdad0af02931de2d000000009done
packet: git< 0000
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
* Trying 104.192.143.2...
* Connected to bitbucket.org (104.192.143.2) port 443 (#2)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* SSL re-using session ID
* server certificate verification OK
* common name: bitbucket.org (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject:
* start date: Tue, 03 May 2016 00:00:00 GMT
* expire date: Fri, 22 Jun 2018 12:00:00 GMT
* issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 Extended Validation Server CA
* compression: NULL
* cipher: AES-128-CBC
* MAC: SHA256
* Server auth using Basic with user '<user name>'
> POST /reponame.git/git-upload-pack HTTP/1.1
Authorization: Basic c3JlZWthbnRoX25jOnNyZWVrYW50aGhlcmU=
User-Agent: git/1.9.1
Host: bitbucket.org
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 240
* upload completely sent off: 240 out of 240 bytes
* GnuTLS recv error (-9): A TLS packet with unexpected length was received.
* Closing connection 2
error: RPC failed; result=56, HTTP code = 0
fatal: The remote end hung up unexpectedly
答案 0 :(得分:0)
错误:RPC失败; result = 52,HTTP code = 0
这意味着git尝试使用libcurl
库执行HTTP操作,但操作意外失败。因此,git报告libcurl
(“结果”)返回的错误代码和HTTP错误代码。
在这种情况下,HTTP错误代码为0,这通常意味着没有收到HTTP错误代码(这是一个小的git错误,它不应该列出HTTP代码)。
libcurl
错误代码为52.根据the docs,这意味着:
CURLE_GOT_NOTHING(52) - 没有从服务器返回任何内容,在这种情况下, 什么都没有被认为是一个错误。
总结如下:在HTTP调用期间,删除服务器在预期的时候没有发送响应。
要了解更多信息,您需要进一步调试。正如评论中所解释的,一个好的选择是在调用git时设置GIT_CURL_VERBOSE=1
和GIT_TRACE_PACKET=1
- 这将输出额外的信息。
这可能是git服务器上的配置问题,或者您使用了错误的URI。