错误如下:

[html]  view plain  copy
 print ?
  1. $ git clone https://github.com/blah/blah.git  
  2. Initialized empty Git repository in /home/arun/.git/  
  3. error: gnutls_handshake() failed: A TLS packet with unexpected length was  
  4.        received. while accessing https://github.com/blah/blah.git/info/refs  
  5.   
  6. fatal: HTTP request failed  

解决方法:

[html]  view plain  copy
 print ?
  1. sudo apt-get install build-essential fakeroot dpkg-dev  
  2. mkdir ~/python-pycurl-openssl  
  3. cd ~/python-pycurl-openssl  
  4. sudo apt-get source python-pycurl  
  5. sudo apt-get build-dep python-pycurl  
  6. sudo apt-get install libcurl4-openssl-dev  
  7. sudo dpkg-source -x pycurl_7.19.0-4ubuntu3.dsc  
  8. cd pycurl-7.19.0  
  9. # remove the HAVE_CURL_GNUTLS=1 in the following file  
  10. sudo vim debian/patches/10_setup.py.dpatch  
  11. # remove the HAVE_CURL_GNUTLS=1 in the following file  
  12. sudo vim setup.py  
  13. # replace all gnutls into openssl in the following file  
  14. sudo vim debian/control  
  15. sudo dpkg-buildpackage -rfakeroot -b  
  16. sudo dpkg -i ../python-pycurl_7.19.0-4ubuntu3_amd64.deb  
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐