"Peer's Certificate issuer is not recognized" while adding docker repo

Viewed 15799

Running:

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Produces:

Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo:
[Errno 14] curl#60 - "Peer's Certificate issuer is not recognized."
3 Answers

Add sslverify=0 in Partiucaler repo. If you want to add for all repos then add in /etc/yum.conf

Some times, when you try to add a repo in large enterprises, you are behind a network proxy. One way to find it out is to open the repo's URL in the browser and see the SSL certs. In such cases, you will have to manually trust the certificates and the entire chain. In CentOS/RHEL, I had to copy all the required certs to (take a backup of the directory, just in case): /etc/pki/ca-trust/source/anchors/ And then run this command: update-ca-trust extract And now you can add the repo like so: yum-config-manager --add-repo <url-of-the-repo>

I encountered this and solved it with

yum reinstall ca-certificates
Related