Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://mirrors.zte.com.cn/docker-ce/linux/centos/docker-ce.repo [SSL certificate problem: EE certificate key too weak]
时间: 2024-01-31 16:04:01 浏览: 333
这个错误是因为你使用的是过时的 SSL 证书,无法通过认证。建议你更新 SSL 证书或者使用最新的证书来解决这个问题。你可以尝试使用以下命令更新证书:
```
sudo yum update ca-certificates
```
如果这个命令不能解决问题,你可以尝试手动更新证书。你可以在 https://curl.haxx.se/docs/caextract.html 下载最新的证书,然后将其复制到 /etc/pki/tls/certs/ca-bundle.crt 文件中。
相关问题
Failed to search for file: cannot update repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://mirrors.zte.com.cn/centos/8/os/x86_64/repodata/repomd.xml [SSL certificate problem: EE certificate key too weak]
这个错误是由于系统无法验证镜像站点的 SSL 证书而导致的。这通常是由于 SSL 证书过期或者证书的密钥强度不足所致。你可以尝试以下几种方法来解决该问题:
1. 更新系统的 ca-certificates 包。你可以使用以下命令来更新:
```bash
sudo dnf update -y ca-certificates
```
如果更新后问题仍然存在,请尝试下一步解决方案。
2. 手动下载并安装镜像站点的 SSL 证书。你可以使用以下命令来手动下载:
```bash
sudo curl -o /etc/pki/ca-trust/source/anchors/mirror-cert.crt https://mirrors.zte.com.cn/centos/8/os/x86_64/repodata/repomd.xml
```
然后,你需要使用以下命令来更新 SSL 证书:
```bash
sudo update-ca-trust
```
如果更新后问题仍然存在,请尝试下一步解决方案。
3. 禁用 SSL 验证。你可以通过以下方法来禁用 SSL 验证:
```bash
sudo vim /etc/yum.conf
```
然后,在该文件中添加以下内容:
```bash
[main]
sslverify=false
```
保存并关闭文件后,重试你的操作。注意:禁用 SSL 验证可能会带来安全风险,应当谨慎使用。
如果以上方法都无法解决问题,可能是因为镜像站点出现了其他问题或者你的网络连接存在问题,你可以尝试更换其他的镜像站点或者检查一下你的网络连接是否正常。
Could not fetch/save url https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] curl#60 - "Peer's Certificate has expired."是什么错误
这个错误是由于证书过期导致的。在HTTPS连接中,服务器会向客户端发送一个证书,证明服务器是可信的。如果证书过期,客户端就无法验证服务器的可信性,因此会出现这个错误。在这个具体的错误中,你可能是在尝试从阿里云下载Docker的repo文件,但是服务器证书已经过期,导致下载失败。你可以尝试更新证书或者使用其他可信的镜像源。
阅读全文
相关推荐
















