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
- Delete all repos and create a new yum repository.
/etc/hostsfile for any false DNS resolutions of servers.