Make git go back to SSLv3 when TLSv1 finishes with "Ignored Unknown Record"

You can not use git:

git clone https://github.com/foo/bar

fails:

fatal: unable to access 'https://github.com/foo/bar': Unknown SSL  protocol error in connection to github.com:443

How can I get to gituse SSLv3? I tried to compile git from the source code, but there is no setting outside of:: --with-openssl(default). Adding the following line to line 408 in remote-curl.cdoes not work either:

 curl_easy_setopt(slot->curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3);

Here are some tips:

  • case 1 . When my browser tries to get to https://github.com/foo/bar, it first tries TLSv1. A handshake seems to be in order: server key exchange, server greeting (in Wireshark). But from the "Ignored Unknown Record" you should use "Ignore Unknown Record" and, finally, "Reset Connection" from the server. Then a new connection, but with SSLv3, and everything is fine (see picture ).

  • case 2 : curlcannot use TLSv1

    curl https://github.com/foo/bar
    

    fails:

    curl: (35) Unknown SSL protocol error in connection to github.com:443
    

    Setup --sslv3fixes the problem.

  • case 3 : take this

    sudo add-apt-repository  ppa:cassou/emacs
    

    fails:

    pycurl.error: (35, 'gnutls_handshake() failed: A TLS packet with unexpected length was received.')
    

Edit : curl 7.22.0 (i686-pc-linux-gnu) libcurl / 7.22.0 OpenSSL / 1.0.1.

Edit : debug information

Cloning into 'bar'...
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to github.com port 443 (#0)
*   Trying 192.30.252.130... * Connected to github.com (192.30.252.130) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
    CApath: /etc/ssl/certs
* Unknown SSL protocol error in connection to github.com:443
* Closing connection #0
fatal: unable to access 'https://github.com/foo/bar/': Unknown SSL       protocol error in connection to github.com:443
+4
1

2015: Git 2.6+ (Q3 2015) SSL:

http: SSL

. commit 01861cb (14 2015 .) Elia Pinto (devzero2000).
: (sunshineco).
( Junio ​​C Hamano - gitster - commit ed070a4, 26 2015 .)

http.sslVersion

SSL, SSL-, .
, libcurl NSS OpenSSL . "CURLOPT_SSL_VERSION"; . libcurl ssl.
:

  • SSLv2
  • SSLv3
  • TLSv1
  • tlsv1.0
  • tlsv1.1
  • tlsv1.2

< <26 > . Git libcurl default ssl http.sslversion, 'GIT_SSL_VERSION' .


: 2013

, PROXY :

export HTTP_PROXY=http://user:password@proxy.mycompany.com:port
export HTTPS_PROXY=http://user:password@proxy.mycompany.com:port
export NO_PROXY=.mycompany.com

~/.netrc file GitHub.

, git config http.sslcainfo /path/to/git/bin/curl-ca-bundle.crt, , GitHub.


, https , ssh url

git clone ssh://user@server:project.git

( GitHub)

+4

All Articles