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