简体   繁体   中英

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

Since couple days I am facing this issue with git clone, I also went though similar issues on stackoverflow which didn't solve this issue. Firewall is also not present in my system. Any input on this or debug this issue will be useful.

Example while cloning the apache mesos logs (export GIT_CURL_VERBOSE=1 used)

# 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

Is this happening with any other repo?

I did have this error before and I recompiled git to get it working again

here's some of the steps I took

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

Not using -y is ok, -y is just for skip inputting y. The result is:

└> $ 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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