FTP Based YUM on RHEL 8

Latest response

I have created a ftp based yum server on RHEL 8, local installation on server machine is good. But when I enter # yum repolist on client machine, it show "Failed to download metadata for repo". please help me


I am getting the same issue. I built an FTP server using Centos 7 and created the FTP repo on RHEL 8. I am able to curl, and FTP to my FTP server no problem. However, when I configured my ftp.repo I get the following error.

Failed to download metadata for repo 'ftprepo'

Error: Failed to download metadata for repo 'ftprepo'

I was wondering if anyone has resolved this

Here is my config for my repo


name=ftp repo




Looks like I was missing a command which proved to resolve the issue. Ensure the following is installed

sudo yum install createrepo

sudo yum install yum-utils

The createrepo utility seemed to resolve the issue.

sudo createrepo /var/ftp


I had the same problem yesterday until I added "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release" (no quotes) to the repo file.

To add to what Annetta said...

This is separate and apart from the yum FTP question...

With newly created systems, and sometimes with other systems, it is highly useful to run the following command (again, this is in addition to what Annetta Crews said above):

  • Run the following as root.
rpm --import -vv /etc/pki/rpm-gpg/*
  • The -vv is optional, but it just lets you see the ingest of the keys. I have this in my kickstarts so that when someone (or some script) performs yum actions, there is no issue. Did I mention that this post here in regards to what Annetta Crews said, and separate and apart from the FTP yum question?