I was running into some issues with the EPEL repo on CentOS 6.x. I had just installed the OS and the EPEL/remi repos and whilst trying to search for a package the same error kept repeating.
Cannot retrieve metalink for repository: epel
and it kept failing each time.
The fix involved editing the EPEL repo and making a simple change from https to http. Why or how this broke is beyond me, but this fix may help someone else.
Assuming you have root or su:
1. Edit the epel repo
nano /etc/yum.repos.d/epel.repo
Find line:
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
Change to
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
Save and exit.
2. Clean yum
yum clean all
That did it for me!
Cheers,
noveck