Home / YUM error: Peer cert cannot be verified or peer cert invalid” or ‘certificate verify failed`

YUM error: Peer cert cannot be verified or peer cert invalid” or ‘certificate verify failed`

yum

The error produced during the yum update is given below.

Error: failed to retrieve repodata/-primary.xml.gz
error was [Errno 14] Peer cert cannot be verified or peer cert invalid

Perform the following steps to resolve the yum error:

  • check and correct the date and time of the server.
  • Disable SSL verification by adding sslverify=false in /etc/yum.conf
  • Delete all repos and create a new yum repository.
  • Check /etc/hosts file for any false DNS resolutions of servers.

Leave a Reply