1. 程式人生 > 其它 >轉 - 解決github gnutls_handshake() failed問題

轉 - 解決github gnutls_handshake() failed問題

轉自:解決github gnutls_handshake() failed的問題

github clone檔案的時候提示gnutls_handshake() failed,有幾種解決方法:

1:https改為git

參考此文

2:https改為http

參考Git gnutls_handshake() failed解決辦法 - osc_yabfjcbk的個人空間 - OSCHINA - 中文開源技術交流社群

3:用git config命令配置sslVerify為false

git config http.sslVerify "false"

我的專案由於是python指令碼自動下載,所以嘗試第三種方法,沒有成功

4:增加使用者資訊,然後再git,這次成功

$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]

但是拉取幾個repo之後,又不行了

5:取消或者設定代理

取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
使用代理
git config --global http.https://github.com.proxy http://127.0.0.1
:7890 git config --global https.https://github.com.proxy https://127.0.0.1:7890

取消代理,還是不行

6:採用openssl替代gnutls

參考git clone https:// gnutls_handshake() failed: The TLS connection was non-properly terminated._laviolette的專欄-CSDN部落格