fatal: unable to access ‘https://github.com/.git/‘: gnutls_handshake() failed: Error

git clone 时 用 https的方式,报错 fatal: unable to access ‘https://github.com/.git/‘: gnutls_handshake() failed: Error, 用git 的方式clone 时ok,但是一般开源的安装包(如果需要用源码安装的话)都会是 https方式,当然也可以自己去找到 git 地址 clone,但是一般也会因为没有权限而失败。

网上常见的方式是 重新构建git安装包,替换gnutls为openssl可以修改上述问题。

但是我在构建的时候一直失败,怎么都过不去,无奈又找了个简单的方法,具体如下,我这边是测试没有问题的。

增加如下设置:

vi ~/.gitconfig
[https]
sslVerify=true

你可能感兴趣的:(git,github,npm)