我可以通过使用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
当前回答
Linux/Debian使用:
sudo cp /etc/ca-certificates.conf /etc/ca-certificates.conf.orig
sudo nano /etc/ca-certificates.conf
Change “mozilla/DST_Root_CA_X3.crt” in “!mozilla/DST_Root_CA_X3.crt” an save
sudo update-ca-certificates
https://talk.plesk.com/threads/lets-encrypt-root-certificate-expiration-on-30-september-2021.362224/
其他回答
注意:这具有重大的安全影响。
打开终端,执行以下命令:
export GIT_SSL_NO_VERIFY=1
它为我工作,我使用Linux系统。
今天我在freedesktop.org上使用Git for Windows时遇到了这个问题。我把git版本从2.28更新到2.35,问题就解决了。可能是windows版本的集成shell环境没有更新的证书。
希望这对使用Windows版本的用户有所帮助。
不需要将git SSL验证设置为false。这是由于系统中没有所有的CA授权证书。大多数拥有真正SSL证书的人都缺少中间证书。
只需将中间证书全文(缺失CA和中间证书的全链)添加到
sudo gedit /etc/ssl/certs/ca-certificates.crt
不运行update-ca-certificates即可工作。
对于手动生成的证书也一样,只需添加CA证书文本。
最后:Push successful:一切都是最新的
或者简单地运行这个注释来添加服务器证书到你的数据库:
echo $(echo -n | openssl s_client -showcerts -connect yourserver.com:YourHttpGilabPort 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p') >> /etc/ssl/certs/ca-certificates.crt
然后再做git克隆。
最后,添加http。Sslverify到你的.git/config。
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://server/user/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[http]
sslVerify = false