Leapp upgrade fails with error 'No repositories available' or 'This system has no repositories available through subscriptions'
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Issue
-
Re-running the failed Leapp upgrade command results in the following error:
# leapp upgrade This system has no repositories available through subscriptions. # dnf repolist Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register. No repositories available # subscription-manager repos This system has no repositories available through subscriptions.
Resolution
-
Check if the RHEL product certificate is present in
/etc/pki/productor/etc/pki/product-default.# ls /etc/pki/product # ls /etc/pki/product-default -
If the product certificate is missing from the above directories, download it from the This content is not included.Red Hat customer portal lab and place it in
/etc/pki/product. -
Then verify the certificate details.
# rct cat-cert /etc/pki/product/479.pem
Root Cause
- When the Leapp upgrade command fails on the system for any reason, the product certificates may sometimes be removed from the system. Need to place the correct product certificates to
/etc/pki/productor/etc/pki/product-defaultto solve this.
Product(s)
Components
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.