我可以通过使用ssh的克隆项目推送,但它不工作时,我克隆项目与https。
它显示的错误信息是:
server certificate verification failed. CAfile: /etc/ssl/certs/cacertificates.crt CRLfile: none
我可以通过使用ssh的克隆项目推送,但它不工作时,我克隆项目与https。
它显示的错误信息是:
server certificate verification failed. CAfile: /etc/ssl/certs/cacertificates.crt CRLfile: none
当前回答
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates -y
sudo update-ca-certificates
对我有用。
其他回答
我在树莓派2上安装了Xubuntu,发现时间上也有同样的问题,NTP和自动服务器同步是关闭的(或者没有安装)。得到国家结核控制规划
sudo apt-get install ntp
将“时间及日期”由“手动”改为“与互联网服务器保持同步”
我刚刚遇到了非常相同的问题,一个git存储库,这总是为我工作。问题是我通过公共WiFi访问它,它会在第一次连接时重定向到专用门户(例如显示广告并同意tos)。
让我们加密2021年9月30日根CA到期
这个错误的另一个来源是一个过期的根CA,如果你使用Let's Encrypt,它昨天发生在其中一个根CA上: https://docs.certifytheweb.com/docs/kb/kb-202109-letsencrypt/
您可以通过运行来确认
openssl s_client -showcerts -connect $hostname:$port -servername $hostname | grep "certificate has expired"
在这种情况下,您需要在/etc/gitlab/ssl/$hostname.crt中编辑gitlab证书
将文件中过期的DST根CA X3块替换为https://letsencrypt.org/certs/isrgrootx1.pem的内容,并重新加载服务器。
GIT_CURL_VERBOSE=1 git [clone|fetch]…
应该能告诉你问题在哪里。在我的例子中,这是因为cURL在基于NSS构建时不支持PEM证书,因为这种支持在NSS中不是主线(#726116 #804215 #402712等等)。
我知道已经有很多答案了。对于那些使用专用网络(如Zscaler等)的用户来说,如果需要更新rootcert,则可能会出现此错误。如果在Windows机器上使用WSL,这里有一个关于如何实现此更新的解决方案:
#!/usr/bin/bash
# I exported the Zscaler certifcate out of Microsoft Cert Manager. It was located under 'Trusted Root Certification > Certificates' as zscaler_cert.cer.
# Though the extension is '.cer' it really is a DER formatted file.
# I then copied that file into Ubuntu running in WSL.
# Convert DER encoded file to CRT.
openssl x509 -inform DER -in zscaler_cert.cer -out zscaler_cert.crt
# Move the CRT file to /usr/local/share/ca-certificates
sudo mv zscaler_cert.crt /usr/local/share/ca-certificates
# Inform Ubuntu of new cert.
sudo update-ca-certificates