docker pull 拉取报错
Using default tag: latest
Trying to pull repository docker.io/xxxxx ...
Get https://registry-1.docker.io/v2/: x509: certificate has expired or is not yet valid

报错信息:
证书已过期,或者已经无效。
虽然提示是证书问题,但是也还有可能是因为日期原因,因为日起原因变相的导致证书被变得不合格了
先看date

实际上是

所以需要修改下时间
yum -y install ntpdate
ntpdate cn.pool.ntp.org
ntp服务器有很多,如果这个有问题,可自行百度一个替换网址即可,详细操作日志如下
[root@centos7_57 ~]# yum -y install ntpdate
已加载插件:fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* extras: mirrors.ustc.edu.cn
* updates: mirrors.ustc.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 ntpdate.x86_64.0.4.2.6p5-29.el7.centos.2 将被 安装
--> 解决依赖关系完成
依赖关系解决
====================================================================================================================================================================================
Package 架构 版本 源 大小
====================================================================================================================================================================================
正在安装:
ntpdate x86_64 4.2.6p5-29.el7.centos.2 base 87 k
事务概要
====================================================================================================================================================================================
安装 1 软件包
总下载量:87 k
安装大小:121 k
Downloading packages:
ntpdate-4.2.6p5-29.el7.centos.2.x86_64.rpm | 87 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : ntpdate-4.2.6p5-29.el7.centos.2.x86_64 1/1
验证中 : ntpdate-4.2.6p5-29.el7.centos.2.x86_64 1/1
已安装:
ntpdate.x86_64 0:4.2.6p5-29.el7.centos.2
完毕!
[root@centos7_57 ~]# ntpdate cn.pool.ntp.org
23 Mar 16:29:45 ntpdate[10334]: step time server 84.16.73.33 offset 26155840.100540 sec
[root@centos7_57 ~]#
[root@centos7_57 ~]#
[root@centos7_57 ~]# date
2023年 03月 23日 星期四 16:29:48 CST
[root@centos7_57 ~]#
再次尝试拉取,成功

|