docker search 出错原因之一是系统时间不同步

tech2022-07-30  132

docker search 报错Error response from daemon: Get https://index.docker.io/v1/search?q=redis&n=25: x509: certificate has expired or is not yet valid

试过好多方法不行 最后发现是centos 时间不同步 如果时间是对的那就找其他原因

date # 可查系统时间

centos 系统时间同步

yum -y install ntp ntpdate ntp1.aliyun.com 如果出现 3 Dec 14:35:24 ntpdate[3476]: the NTP socket is in use, exiting 进行下一步 1. ntpdate ntp.api.bz 2. service ntpd stop 3.ntpdate ntp1.aliyun.com

系统时间写入硬件时间

hwclock --systohc

强制系统时间写入CMOS中防止重启失效

 sudo hwclock -w
最新回复(0)