Git on Windows not working with remote due to SSL protocol errors

TL; DR

Git on Windows stops connecting to github due to mysterious SSL protocol errors. Halp!

Problem

I am developing Windows using a private GitHub repository for version control. The first time I load my system, I can access the remote repo no problems - pull, push, fetchetc. Everything is working fine.

After some amount of time (*), this stops and I get the following error:

fatal: unable to access https://github.com/our-team/private-repo.git/ ': Unknown SSL protocol error due to github.com:443

(*) The amount of time seems variable - I witnessed only an hour or two, up to the whole day. Usually it seems to be a problem after returning from the system to sleep, but I do not know if this is caused by a time delay or by a sleeping system.

Validation via cURL, I get

λ curl -v "https://github.com/our-team/private-repo.git/"
*   Trying 192.30.252.130...
* Connected to github.com (192.30.252.130) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:\Program Files (x86)\Git\bin\curl-ca-bundle.crt
  CApath: none
* TLSv1.0, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to github.com:443
* Closing connection 0
curl: (35) Unknown SSL protocol error in connection to github.com:443

Using set GIT_CURL_VERBOSE=1c git pullshows similar information. Sometimes it succeeds (see below), but most of the time it fails.

Additional notes

Here is a little sporadic in nature - sometimes I can get requests for success, but as soon as it starts to explode, it usually breaks into 9 out of 10 requests or more.

A successful cURL request looks like this:

λ curl -v "https://github.com/our-team/private-repo.git/"
*   Trying 192.30.252.130...
* Connected to github.com (192.30.252.130) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:\Program Files (x86)\Git\bin\curl-ca-bundle.crt
  CApath: none
* TLSv1.0, TLS handshake, Client hello (1):
* TLSv1.0, TLS handshake, Server hello (2):
* TLSv1.0, TLS handshake, CERT (11):
* TLSv1.0, TLS handshake, Server finished (14):
* TLSv1.0, TLS handshake, Client key exchange (16):
* TLSv1.0, TLS change cipher, Client hello (1):
* TLSv1.0, TLS handshake, Finished (20):
* TLSv1.0, TLS change cipher, Client hello (1):
* TLSv1.0, TLS handshake, Finished (20):
* SSL connection using TLSv1.0 / AES128-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=5157550; street=548 4th Street; postalCode=94107; C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
*        start date: 2014-04-08 00:00:00 GMT
*        expire date: 2016-04-12 12:00:00 GMT
*        subjectAltName: github.com matched
*        issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
*        SSL certificate verify ok.
> GET /our-team/private-repo.git/ HTTP/1.1
> User-Agent: curl/7.41.0
> Host: github.com
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: GitHub.com
< Date: Mon, 11 May 2015 15:19:43 GMT
< Content-Type: text/html
< Content-Length: 178
< Location: https://github.com/our-team/private-repo/
< Vary: Accept-Encoding
< X-Served-By: 76f8aa18dab86a06db6e70a0421dc28c
<
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host github.com left intact

Question

, ( , ), , , / OpenSSL ( AFAIK).

?

:

λ git --version
git version 1.9.5.msysgit.1

λ curl --version
curl 7.41.0 (i386-pc-win32) libcurl/7.41.0 OpenSSL/0.9.8zf zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz
+4
3

, , , - . -, , (3,3 ), , , .

-, , , SSL- .

, Dell (http://en.community.dell.com/support-forums/laptop/f/3518/t/19363340), . .

, , . -, , SSL .

+5

, , - - weakdh.org -.
, SSL/TLS.

, , " : ", git.

, Git Windows (, Git 2.4.1)

+3

There was the same problem. Disconnected my Wi-Fi connection and switched to cable, and everything works again. Btw: Used by Dell in the dock.

0
source

All Articles