How Do You Troubleshoot the yum Repository “Errors during downloading metadata for repository”?

Problem scenario
You try to use a yum command on RHEL 8.2. But you get this error:

Docker Repository 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository 'foobar': - Curl error (6): Couldn't resolve host name for https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml [Could not resolve host: yum.dockerproject.org] Error: Failed to download metadata for repo 'foobar': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

What should you do?

Solution
Run this command but replace "foobar": sudo yum-config-manager --disable foobar

Leave a comment

Your email address will not be published. Required fields are marked *