docker 报错:x509: certificate has expired or is not yet valid

Posted Oops!

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker 报错:x509: certificate has expired or is not yet valid相关的知识,希望对你有一定的参考价值。

环境:centos 7

程序:docker 

下载镜像报错:

# docker pull centos

Pulling repository centos

FATA[0004] Get https://index.docker.io/v1/repositories/library/centos/images: x509: certificate has expired or is not yet valid 

 

这种错误,一般都是本地系统时间错误导致报错证书过期,所以先查看本地系统时间

 

# date "+%Y-%m-%d"  #系统时间2月15日,而正确时间应该是4月17日,所以很大可能就是该原因   

2015-02-15

 

解决:

# ntpdate cn.pool.ntp.org               #同步一下时间

17 Apr 17:40:45 ntpdate[32206]: step time server 202.112.29.82 offset 5262859.193967 sec

 

# date "+%Y-%m-%d"                      #时间同步成功

2015-04-17

 

# docker pull centos           #成功下载镜像,问题解决

centos5: Pulling from centos

861c710fef70: Downloading [>               ] 1.075 MB/87.03 MB

511136ea3c5a: Already exists 

5b12ef8fd570: Already exists

以上是关于docker 报错:x509: certificate has expired or is not yet valid的主要内容,如果未能解决你的问题,请参考以下文章

docker pull / docker login 报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509

docker pull / docker login 报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509

docker报错: x509: certificate has expired or is not yet valid

docker报错Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate has expi

docker pull 失败报错:x509: certificate has expired or is not yet valid

docker报错: x509: certificate has expired or is not yet valid