I am posting this because one day yum decided to break down on me, and everything else that I tried from Googling the web failed.
One night I was in the middle of a yum install when I pressed control-C to abort. Ever since then, yum became terribly confused and refused to work any longer: ALL of my repositories returned the following error message:
[Errno -1] Metadata file does not match checksum
I tried all the usual suggestions: yum clean all, yum clean metadata, yum update. I tried entirely deleting the yum cache directories. I tried rebooting. Nothing worked.
I went into the one of the yum cache directories and noticed that even when I clear out the entire directory and download the new information - including the repomd.xml file and primary.xml.gz file, the 'repomd.xml' file was actually date stamped from two weeks earlier.
I opened up repomd.xml and looked at the hash value for the primary.xml.gz file. I then computed a hash in primary.xml.gz using sha1sum. They didn't match.
Hence, I figured that my ISP was serving an older cached version of the repomd.xml file which was out of date and therefore the checksums didn't match.
I went onto IRC and someone kindly suggested doing this: Explicitly export a variable in bash which contains the IP address of your http proxy. So, I went into bash and did something like:
export http_proxy=[full http address here]
(I had to edit that because the forum wouldn't allow me to post an example URL - just be sure to indicate the http protocol and include the port number after the IP using a colon).
where that IP address was the IP address of my proxy (which I obtained from doing an 'env check' at cybersyndrome.net.
Which showed my 'REMOTE_ADDR' (the IP of my proxy - as opposed to 'HTTP_FORWARDED_FOR' which is the IP of my computer)
Anyway, I exported that variable, and yum started working again. I guess it must have been a problem with my ISP's cache servers. I'm sure they would have fixed it eventually, but this was a useful fix in the meantime.
I hope this is of some use to someone who is pulling their hair out about yum after trying everything else out there on the web.
Good luck.