Get https://registry-1.docker.io/v2/: x509: certificate has expired or is not...
### docker pull 拉取报错```html
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
```
!(data/attachment/forum/202303/23/162635ddk53nduzpktz8k1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
报错信息:
证书已过期,或者已经无效。
虽然提示是证书问题,但是也还有可能是因为日期原因,因为日起原因变相的导致证书被变得不合格了
### 先看date
!(data/attachment/forum/202303/23/162829ys3mm4homlogk11g.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
实际上是
!(data/attachment/forum/202303/23/162840bjkqkkulu488k8lj.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
所以需要修改下时间
`yum -y install ntpdate`
`ntpdate cn.pool.ntp.org`
ntp服务器有很多,如果这个有问题,可自行百度一个替换网址即可,详细操作日志如下
```bash
# 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 kB00: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
完毕!
# ntpdate cn.pool.ntp.org
23 Mar 16:29:45 ntpdate: step time server 84.16.73.33 offset 26155840.100540 sec
#
#
# date
2023年 03月 23日 星期四 16:29:48 CST
#
```
再次尝试拉取,成功
!(data/attachment/forum/202303/23/163157lp2kaqmz3m9akzma.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
页:
[1]