Git gnutls_handshake() failed解決辦法


今天在git clone的時候遇到了Git gnutls_handshake() failed的問題:

$ git clone https://github.com/intel/igvtg-qemu
Cloning into 'igvtg-qemu'...
fatal: unable to access 'https://github.com/intel/igvtg-qemu/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

解決方案:

很簡單,把https換成http:

$ git clone http://github.com/intel/igvtg-qemu
Cloning into 'igvtg-qemu'...
warning: redirecting to https://github.com/intel/igvtg-qemu/
remote: Enumerating objects: 57, done.
remote: Counting objects: 100% (57/57), done.
remote: Compressing objects: 100% (43/43), done.

其實出現這個問題,很大可能是因為https和http的proxy的對應的分別是https和http開頭的proxy server,而https的proxy server可能無法正常工作。一個work around是把https的proxy server換成http的proxy server:

git config --global https.proxy <Your http proxy server>
git config --global http.proxy <Your http proxy server>

#The ~/.gitconfig should reflect these entries as:
[http]
        proxy = <Your http proxy server>
[https]
        proxy = <Your http proxy server>

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM