繁体   English   中英

git 克隆错误:RPC 失败; curl 52 GnuTLS 接收错误 (-110)

[英]git clone error: RPC failed; curl 52 GnuTLS recv error (-110)

几天以来,我在使用 git 克隆时遇到了这个问题,我也在 stackoverflow 上遇到了类似的问题,但没有解决这个问题。 我的系统中也不存在防火墙。 对此问题的任何输入或调试此问题都会很有用。

克隆 apache mesos 日志时的示例(使用导出 GIT_CURL_VERBOSE=1)

# git clone https://github.com/apache/mesos.git
Cloning into 'mesos'...
* Couldn't find host github.com in the .netrc file; using defaults
*   Trying 140.82.113.3...
* TCP_NODELAY set
* Connected to github.com (140.82.113.3) port 443 (#0)
* found 129 certificates in /etc/ssl/certs/ca-certificates.crt
* found 387 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_ECDSA_AES_128_GCM_SHA256
*        server certificate verification OK
*        server certificate status verification SKIPPED
*        common name: github.com (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: EC/ECDSA
*        certificate version: #3
*        subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=github.com
*        start date: Thu, 25 Mar 2021 00:00:00 GMT
*        expire date: Wed, 30 Mar 2022 23:59:59 GMT
*        issuer: C=US,O=DigiCert\, Inc.,CN=DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1
*        compression: NULL
* ALPN, server accepted to use http/1.1
> GET /apache/mesos.git/info/refs?service=git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.17.1
Accept: */*
Accept-Encoding: gzip
Accept-Language: en-US, *;q=0.9
Pragma: no-cache

< HTTP/1.1 200 OK
< Server: GitHub Babel 2.0
< Content-Type: application/x-git-upload-pack-advertisement
< Content-Security-Policy: default-src 'none'; sandbox
< Transfer-Encoding: chunked
< expires: Fri, 01 Jan 1980 00:00:00 GMT
< pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
< X-GitHub-Request-Id: 875F:027E:2B3997:E007E0:607E954A
< X-Frame-Options: DENY
<
* Connection #0 to host github.com left intact
* Couldn't find host github.com in the .netrc file; using defaults
* Found bundle for host github.com: 0x2aa0aa414f0 [can pipeline]
* Re-using existing connection! (#0) with host github.com
* Connected to github.com (140.82.113.3) port 443 (#0)
> POST /apache/mesos.git/git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.17.1
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Encoding: gzip
Content-Length: 5713

* upload completely sent off: 5713 out of 5713 bytes
* GnuTLS recv error (-110): The TLS connection was non-properly terminated.
* Connection died, retrying a fresh connect
* Closing connection 0
* Issue another request to this URL: 'https://github.com/apache/mesos.git/git-upload-pack'
* Couldn't find host github.com in the .netrc file; using defaults
*   Trying 140.82.113.4...
* TCP_NODELAY set
* Connected to github.com (140.82.113.4) port 443 (#1)
* found 129 certificates in /etc/ssl/certs/ca-certificates.crt
* found 387 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL re-using session ID
* SSL connection using TLS1.2 / ECDHE_ECDSA_AES_128_GCM_SHA256
*        server certificate verification OK
*        server certificate status verification SKIPPED
*        common name: github.com (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: EC/ECDSA
*        certificate version: #3
*        subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=github.com
*        start date: Thu, 25 Mar 2021 00:00:00 GMT
*        expire date: Wed, 30 Mar 2022 23:59:59 GMT
*        issuer: C=US,O=DigiCert\, Inc.,CN=DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1
*        compression: NULL
* ALPN, server accepted to use http/1.1
> POST /apache/mesos.git/git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.17.1
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Encoding: gzip
Content-Length: 5713
* upload completely sent off: 5713 out of 5713 bytes
* Empty reply from server
* Connection #1 to host github.com left intact
error: RPC failed; curl 52 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
fatal: The remote end hung up unexpectedly

这是否发生在任何其他回购中?

我之前确实遇到过这个错误,我重新编译了 git 让它再次工作

这是我采取的一些步骤

sudo apt-get install build-essential fakeroot dpkg-dev -y
sudo apt-get build-dep git -y
sudo apt-get install libcurl4-openssl-dev -y
cd ~
mkdir source-git
cd source-git/
apt-get source git
cd git-2.*.*/
sed -i -- 's/libcurl4-gnutls-dev/libcurl4-openssl-dev/' ./debian/control
sed -i -- '/TEST\s*=\s*test/d' ./debian/rules
dpkg-buildpackage -rfakeroot -b -uc -us
sudo dpkg -i ../git_*ubuntu*.deb

不使用 -y 是可以的,-y 只是为了跳过输入 y。 结果是:

└> $ git clone https://github.com/apache/mesos.git
Cloning into 'mesos'...
remote: Enumerating objects: 174856, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 174856 (delta 0), reused 0 (delta 0), pack-reused 174851
Receiving objects: 100% (174856/174856), 394.38 MiB | 15.25 MiB/s, done.
Resolving deltas: 100% (130737/130737), done.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM