5

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."
Mitchell Tracy
  • 1,395
  • 1
  • 15
  • 16

3 Answers3

4

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

MeBex
  • 488
  • 1
  • 5
  • 20
3

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>

code4kix
  • 3,937
  • 5
  • 29
  • 44
0

I encountered this and solved it with

yum reinstall ca-certificates
Mitchell Tracy
  • 1,395
  • 1
  • 15
  • 16
  • 1
    still having the same error .Here am using centos 7.4 – BIBHU PRASAD BEURA Jan 10 '19 at 05:48
  • I was able to get this "Peer Cert" issue to go away, but was then unable to install my desired version of docker (17.03) on rhel 7.4. – Mitchell Tracy Jan 11 '19 at 15:07
  • if still issue, then go to /etc/yum.repos.d/ and delete the docker-ce.repo or which ever repo is causing trouble, and then retry.. you can then add back the right valid repo.. –  Feb 14 '23 at 11:11