git push 操作报错

执行git push 命令报错
fatal: unable to access 'https://github.com/thomas9006/python_demo.git/': gnutls_handshake() failed: Error in the pull function.

备注:下面部分为转载的,作者原地址请点击此处

编译openwrt时候遇到此问题,原因貌似是gnutls的协议不支持,可以安装openssl来解决此问题:

下面是网上找到的解决方法:

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:


 
 
  1. sudo apt-get update
  2. sudo apt- get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
  3. sudo apt- get build-dep git
  4. mkdir ~/git-openssl
  5. cd ~/git-openssl
  6. apt- get source git
  7. dpkg- source -x git_1 .7 .9 .5 -1.dsc
  8. cd git -1.7 .9 .5

(Remember to replace 1.7.9.5 with the actual version of git in your system.)

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

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

sudo dpkg-buildpackage -rfakeroot -b

 
 

Install new package:

i386: sudo dpkg -i ../git_1.7.9.5-1_i386.deb

x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb

执行完成后重新编译即可
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值