Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1560907
  • 博文数量: 61
  • 博客积分: 472
  • 博客等级: 下士
  • 技术积分: 548
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-26 11:52
文章分类
文章存档

2018年(1)

2017年(2)

2016年(6)

2015年(3)

2014年(19)

2013年(10)

2012年(20)

分类: LINUX

2018-04-15 19:00:01

解决git 无法clone的问题,错误提示如下


error: gnutls_handshake() failed: A TLS packet with unexpected length was received. while accessing ...
fatal: HTTP request failed




Got reason of the problem, it was gnutls package. It's working weird behind a proxy. But openssl is working fine even in weak network. So workaround is that we should compile git with openssl. To do this, run the following commands:

sudo apt-get install build-essential fakeroot dpkg-dev
mkdir ~/git-openssl
cd ~/git-openssl
sudo apt-get source git
sudo apt-get build-dep git
sudo apt-get install libcurl4-openssl-dev
sudo dpkg-source -x git_1.7.9.5-1.dsc
cd git_1.7.9.5 8. 

Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev

sudo dpkg-buildpackage -rfakeroot -b 

(if it's failing on test, you can remove the line TEST=test from the file debian/rules)

sudo dpkg -i ../git_1.7.9.5-1_i386.deb 
阅读(5016) | 评论(0) | 转发(0) |
0

上一篇:Ubuntu16.04配置apache+php+mysql

下一篇:没有了

给主人留下些什么吧!~~