Foreman installer produces GPG key error on new RHEL 7.5 box

Problem:

Installing Foreman 1.18 on new RHEL 7.5 minimal install says GPG keys are wrong.

The GPG keys listed for the “Foreman 1.18” repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
Failing package is: centos-release-scl-2-2.el7.centos.noarch

Expected outcome:

Not to get these errors.

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Other relevant data:

I can attach the full foreman log, but it’s 2 MB, so I’m not sure where I can do that. Here is the bottom of the log.

https://pastebin.com/fnpJaLsL


Complete install command set:

Install RHEL 7.5 minimal.
Set hostname: hostnamectl set-hostname foreman.kvm.local
Set Static IP for host: vi /etc/sysconfig/network-scripts/ifcfg-eth0
Add /etc/hosts entry: vi /etc/hosts
Install yum-utils: yum -y install yum-utils
Disable firewalld and selinux:
systemctl stop firewalld
systemctl disable firewalld
vi /etc/sysconfig/selinux
setenforce 0
Follow quickstart guide:
yum-config-manager --enable rhel-7-server-optional-rpms
yum -y install https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install https://yum.theforeman.org/releases/1.18/el7/x86_64/foreman-release.rpm
yum -y update
yum -y install foreman-installer
foreman-installer

For RHEL you won’t want to install the foreman-release-scl given it installs the centos-release-scl which is not available on RHEL. You will need the RHSCL repositories available to use RHEL.

That’s slightly tricky. We do need the Rails SCL which in 1.18.0 is shipped as part of foreman-release-scl but that depends on centos-release-scl. In 1.18.1 we’ll fix this by moving that to foreman-release.

Another problem is that I think we also didn’t properly add the extra package centos-release-scl in our repositories. In CentOS this is no problem because they have a newer version anyway.

For now I’d recommend manually adding https://yum.theforeman.org/releases/1.18/ as a repository. To avoid installing foreman-release-scl you should also add --foreman-configure-scl-repo false to foreman-installer.

Thanks. By installing the rhscl repo and telling the installer not to configure the scl repo, I was able to successfully install Foreman on RHEL 7.5.

I didn’t have to manually add the foreman repos though. I used the RPM as suggested by the quickstart guide.