Curl error (60): SSL peer certificate or SSH remote key was not OK for https://update.cs2c.com.cn/NS/V10/V10SP2/os/adv/lic/base/x86_64/repodata/repomd.xml [SSL: no alternative certificate subject name matches target host name 'update.cs2c.com.cn']

简介: 【10月更文挑战第30天】在尝试从麒麟软件仓库(ks10-adv-os)下载元数据时,遇到 SSL 证书验证问题。错误提示为:`Curl error (60): SSL peer certificate or SSH remote key was not OK`。可能原因包括证书不被信任、证书与域名不匹配或网络问题。解决方法包括检查网络连接、导入 SSL 证书、禁用 SSL 证书验证(不推荐)、联系仓库管理员、检查系统时间和尝试其他镜像。

报错解决
这个错误信息表明在尝试从麒麟软件的仓库(ks10-adv-os)下载元数据时,遇到了 SSL 证书验证问题。具体来说,错误提示是:

Curl error (60): SSL peer certificate or SSH remote key was not OK for https://update.cs2c.com.cn/NS/V10/V10SP2/os/adv/lic/base/x86_64/repodata/repomd.xml
[SSL: no alternative certificate subject name matches target host name 'update.cs2c.com.cn']
这通常意味着以下几种情况之一:

SSL 证书不被信任:服务器提供的 SSL 证书不被你的系统信任。这可能是因为证书是自签名的,或者证书不在系统的受信任证书存储中。

证书与域名不匹配:服务器提供的 SSL 证书的域名与请求的域名不匹配。

网络问题:网络连接问题可能导致无法正确验证 SSL 证书。

要解决这个问题,你可以尝试以下步骤:

  1. 检查网络连接
    确保你的系统可以正常访问 update.cs2c.com.cn。你可以尝试使用 ping 或 curl 命令来测试连接:

bash
ping update.cs2c.com.cn
curl -I https://update.cs2c.com.cn

  1. 导入 SSL 证书
    如果证书不被信任,你可能需要手动将 SSL 证书导入到系统的受信任证书存储中。这通常需要管理员权限。

  2. 禁用 SSL 证书验证(不推荐)
    作为一种临时解决方案,你可以在 yum 配置中禁用 SSL 证书验证。这不是推荐的做法,因为它会降低安全性,但可以作为临时措施来解决问题:

bash
sudo yum --disablerepo=ks10-adv-os install some-package
或者,在 /etc/yum.conf 或仓库配置文件中添加:

bash
sslverify=0
请注意,这种方法会禁用 SSL 证书验证,可能会使你的系统面临中间人攻击的风险。

  1. 联系仓库管理员
    如果问题持续存在,你可能需要联系仓库管理员或麒麟软件的技术支持,以获取更多帮助。

  2. 检查系统时间
    确保你的系统时间是准确的,因为 SSL 证书验证可能会因为时间不同步而失败。

  3. 尝试其他镜像
    如果问题是由于特定镜像的问题,尝试更换到其他镜像可能会有所帮助。

目录
相关文章
|
网络安全 Python
python request SSL error 403证书错误
python request SSL error 403证书错误
406 0
|
算法 Linux 网络安全
Centos7 Linux系统下生成https的crt和key证书
Centos7 Linux系统下生成https的crt和key证书
1052 0
|
网络安全
ssh: Could not resolve hostname centos02: Temporary failure in name resolution
ssh: Could not resolve hostname centos02: Temporary failure in name resolution
1969 0
|
Ubuntu 关系型数据库 网络安全
基于docker搭建gitea私服仓库,并开启https访问、ssh访问和邮箱验证通知功能
基于docker搭建gitea私服仓库,并开启https访问、ssh访问和邮箱验证通知功能
5256 1
基于docker搭建gitea私服仓库,并开启https访问、ssh访问和邮箱验证通知功能
|
网络安全
ssh(Spring+Spring mvc+hibernate)——applicationContext.xml
ssh(Spring+Spring mvc+hibernate)——applicationContext.xml
|
应用服务中间件 Linux nginx
NGINX配置HTTPS及PSF证书转换为PEM与KEY
NGINX配置HTTPS及PSF证书转换为PEM与KEY
1756 1
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
初始化Kubenetes报错1:[kubelet-check] The HTTP call eal to ‘curl -sSL.
初始化Kubenetes报错1:[kubelet-check] The HTTP call eal to ‘curl -sSL.
608 0
|
缓存 Shell 网络安全
Github-推送代码报错“error:RPC failed;curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL,errno 10054”解决方案
Github-推送代码报错“error:RPC failed;curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL,errno 10054”解决方案
2216 0
|
安全 Linux 数据安全/隐私保护
Vanilla OS:下一代安全 Linux 发行版
【10月更文挑战第30天】
1947 0
Vanilla OS:下一代安全 Linux 发行版

热门文章

最新文章

推荐镜像

更多