title: Make git revert to SSLv3 when TLSv1 fails with "Ignored Unknown Record"
body: <p>Can't use <code>git</code>:</p>
  
  <pre><code>git clone https://github.com/foo/bar
  </code></pre>
  
  <p>fails:</p>
  
  <pre><code>fatal: unable to access 'https://github.com/foo/bar': Unknown SSL  protocol error in connection to github.com:443
  </code></pre>
  
  <p>How can I force <code>git</code> to use SSLv3? I tried to compile git from source, but there is no setting beyond: <code>--with-openssl</code> (default). Adding the following line before line 408 in <code>remote-curl.c</code> doesn't work either:</p>
  
  <pre><code> curl_easy_setopt(slot-&gt;curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3);
  </code></pre>
  
  <p>Here are some clues:</p>
  
  <ul>
  <li><p><strong>case 1</strong>: When my browser tries to get to <code>https://github.com/foo/bar</code>, it first tries TLSv1. Handshake seems to be OK: Server key exchange, server hello done (at Wireshark). But it follows by "Ignored Unknown Record" from server and finally "Connection Reset" from server. Then A new connection but with SSLv3 kicks in and every thing is fine (see <a href="http://i.imgur.com/1Yr3WH6.png" rel="nofollow">picture</a>).</p></li>
  <li><p><strong>case 2</strong>: <code>curl</code> fails using TLSv1</p>
  
  <pre><code>curl https://github.com/foo/bar
  </code></pre>
  
  <p>fails:</p>
  
  <pre><code>curl: (35) Unknown SSL protocol error in connection to github.com:443
  </code></pre>
  
  <p>Setting <code>--sslv3</code> fixes the problem. </p></li>
  <li><p><strong>case 3</strong>: Take this one</p>
  
  <pre><code>sudo add-apt-repository  ppa:cassou/emacs
  </code></pre>
  
  <p>fails:</p>
  
  <pre><code>pycurl.error: (35, 'gnutls_handshake() failed: A TLS packet with unexpected length was received.')
  </code></pre></li>
  </ul>
  
  <p><strong>Edit</strong>: curl 7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1.</p>
  
  <p><strong>Edit</strong>: debug information</p>
  
  <pre><code>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
  </code></pre>