今天在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>

