【发布时间】:2021-05-14 12:04:03
【问题描述】:
当我尝试通过命令克隆存储库时
git clone https://git.lighttpd.net/mirrors/libev.git
我收到一个错误
fatal: unable to access 'https://git.lighttpd.net/mirrors/libev.git/': server certificate verification failed. CAfile: none CRLfile: none
如果设置 GIT_CURL_VERBOSE=1
Cloning into 'libev'...
* Couldn't find host git.lighttpd.net in the .netrc file; using defaults
* Trying 5.9.70.195:443...
* TCP_NODELAY set
* Connected to git.lighttpd.net (5.9.70.195) port 443 (#0)
* found 387 certificates in /etc/ssl/certs
* ALPN, offering h2
* ALPN, offering http/1.1
* SSL connection using TLS1.3 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification failed. CAfile: none CRLfile: none
* Closing connection 0
fatal: unable to access 'https://git.lighttpd.net/mirrors/libev.git/': server certificate verification failed. CAfile: none CRLfile: none
我可以设置GIT_SSL_NO_VERIFY=1,但这并不能解决问题
附: ubuntu 20.04
【问题讨论】:
-
CAfile: none CRLfile: none在您的机器上安装证书。 -
debian 为 git 使用 gnutls curl 库(curl 二进制文件使用 openssl 库); gnutls 默认检查 ocsp 状态,它已经过时了,因为我的“获取新的 ocsp 响应后重新启动服务器”配置被破坏。我使用
gnutls-cli -p 443 git.lighttpd.net来调试这个问题。
标签: git ssl ssl-certificate lighttpd