How to mirror a Red Hat Network (RHN) repository?

Hanan Kemelman
2021-02-02 19:35

How to mirror an RHN repository

In order to mirror a repository hosted on Red Hat Network, you will need to import your PEM certificate to Artifactory.

You may download your PEM certificate by logging in to Red Hat Customer Portal and navigating to System => $SYSTEM => Subscriptions => Download certificates. The downloaded ZIP archive will contain the PEM certificate.
User-added image
After importing the PEM certificate, create a new RPM remote repository.
Under URL pass the URL to the repository (e.g. and add the certificate by navigating to Advanced => Remote Authentication => SSL / TLS Certificate and select the certificate from the drop-down list.

Now, when clicking "Test Connection" you will probably receive the following error message:
User-added image
The reason for this error message is certificate is untrusted.
We can resolve this error by trusting the certificate.

Execute the below command in order to get the certificate, and follow our Knowledge Base to add it to Artifactory.openssl s_client -showcerts -connect