無法使用git
:製作混帳恢復的SSLv3時的TLSv1失敗 「忽略未知記錄」
git clone https://github.com/foo/bar
失敗:
fatal: unable to access 'https://github.com/foo/bar': Unknown SSL protocol error in connection to github.com:443
我怎麼能強迫git
使用的SSLv3?我試圖從源代碼編譯git,但沒有超出以下設置:--with-openssl
(默認)。在remote-curl.c
添加下面的一行行408之前,無法正常工作或:
curl_easy_setopt(slot->curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3);
這裏有一些線索:
情況1:當我的瀏覽器嘗試去
https://github.com/foo/bar
,它首先嚐試TLSv1。握手似乎是好的:服務器密鑰交換,服務器問候(在Wireshark)。但接下來是服務器的「忽略未知記錄」,最後是服務器的「連接重置」。然後,一個新的連接,但SSLv3踢,每一件事情都很好(見picture)。殼體2:
curl
失敗使用的TLSv1curl https://github.com/foo/bar
失敗:
curl: (35) Unknown SSL protocol error in connection to github.com:443
設置
--sslv3
修復該問題。殼體3:取這一個
sudo add-apt-repository ppa:cassou/emacs
失敗:
pycurl.error: (35, 'gnutls_handshake() failed: A TLS packet with unexpected length was received.')
編輯:捲曲7.22.0(i686的-PC-Linux的GNU)的libcurl /7.22.0 OpenSSL/1.0.1。
編輯:調試信息
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
你使用的是什麼版本的Git?什麼版本的捲曲?什麼OS? Linux呢?視窗? Cygwin的? – VonC
請使用'GIT_CURL_VERBOSE = 1'添加調試信息。 –
我從github下載了git源代碼。 curl 7.22.0(i686-pc-linux-gnu)libcurl/7.22.0 OpenSSL/1.0.1。 – Yasser