docker pull 镜像失败报Error response from daemon: Get “https://registry-1.docker.io/v2/“: tls: failed to

本文介绍了在CentOS系统中遇到的Dockerregistry访问错误,原因在于系统时间和硬件时间不一致导致证书验证失败。文章提供了查看系统时间、硬件时间,删除并重置localtime,安装并使用ntp进行时间同步,以及校准硬件和软件时间的方法。
摘要由CSDN通过智能技术生成

报错Error response from daemon: Get “https://registry-1.docker.io/v2/”: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-12-02T22:44:18+08:00 is before 2024-04-04T00:00:00Z
centos系统时间和本地(自己电脑)时间不一致
解决办法
1.查看系统时间与硬件时间
#查看系统时间

date 

#查看硬件时间

hwclock

删除本地时间

rm -rf /etc/localtime

创建软连接

ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

时间同步

yum -y install ntp ntpdate
 
ntpdate ntp1.aliyun.com

校准硬件时间和软件时间一致

/sbin/hwclock --systohc

检查时间

date
 
hwclock

原文链接:https://blog.csdn.net/a1764739438/article/details/132719666

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值