Issue when trying to run command “YUM Update” Cannot retrieve repository metadata (repomd.xml)

centos6updateyum

I'm trying to run the update command with yum:

yum update

I get the follwing message:

[root@commerce-dbs-tes-1 ~]# yum update
Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
 * base: centos.brisanet.com.br
 * extras: centos.brisanet.com.br
 * updates: centos.brisanet.com.br
https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-6-x86_64/repodata/repomd.xml: [Errno 14] Peer cert cannot be verified or peer cert invalid
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: pgdg94. Please verify its path and try again

I know for a fact that there are pending Updates,and it was working until a did:

yum clean all

My system is a CentOS 6.7

Please help

Best Answer

Server cannot verify/accept cert data because of following reasons:

  1. Server date/time is invalid
  2. There is a MIM attack - someone is replacing traffic/issuing other certificate, which is invalid/self signed
  3. Certificate is invalid (not the current one, I see that it's valid, signed by trusted CA)
  4. CA certificates on the system are outdated, update ca-certificates package