服务器证书验证失败。 CAfile:/etc/ssl/certs/ca-certificates.crt CRLfile:无

本文翻译自:server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

I can push by clone project using ssh, but it doesn't work when I clone project with https. 我可以使用ssh推送克隆项目,但是当我使用https克隆项目时,它不起作用。

The error message that shows me is: 显示我的错误消息是:

server certificate verification failed. CAfile: /etc/ssl/certs/cacertificates.crt CRLfile: none

#1楼

参考:https://stackoom.com/question/1qScL/服务器证书验证失败-CAfile-etc-ssl-certs-ca-certificates-crt-CRLfile-无


#2楼

TLDR: TLDR:

hostname=XXX
port=443
trust_cert_file_location=`curl-config --ca`

sudo bash -c "echo -n | openssl s_client -showcerts -connect $hostname:$port \
    2>/dev/null  | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'  \
    >> $trust_cert_file_location"

Long answer 长答案

The basic reason is that your computer doesn't trust the certificate authority that signed the certificate used on the Gitlab server . 根本原因是您的计算机不信任对Gitlab服务器上使用证书进行签名的证书颁发机构 This doesn't mean the certificate is suspicious, but it could be self-signed or signed by an institution/company that isn't in the list of your OS's list of CAs. 这并不意味着证书可疑,但是它可以是自签名的,也可以由不在您的操作系统的CA列表中的机构/公司签名。 What you have to do to circumvent the problem on your comput

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值