Adding Docker-CE Repo to CentOS – Peer’s Certificate has expired – yum

To fix “Peer’s Certificate has expired” error, when adding docker repo or installing docker-ce package on CentOS machine.

Platform :

OS : CentOS 7.4.1708
Docker version :  docker-ce-18.03.0

Steps Tried :

curl -fsSL https://get.docker.com/ | sh
curl: (60) Peer's Certificate has expired.
yum install -y -q docker-ce
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate has expired.


Solution :

This would happen when the server timestamp is totally out of sync. You can check the timestamp on the server by using this command

date
Tue Jun 7 17:01:51 EDT 2011

To update the timestamp

ntpdate -u 0.centos.pool.ntp.org

Above command will help to resync the server time with Internet time server. Now you can verify the timestamp on the server by using “date” command

Then, try yum install command. it works fine now.

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *