Leapp upgrade fails with custom repository and reports error 'Cannot find required basic RHEL target repositories.'

Solution Verified - Updated -

Issue

  • The following error occurs during the leapp preupgrade --enablerepo Custom_Repo_ID1 --enablerepo Custom_Repo_ID2 process.
====> * target_userspace_crypto_policies
        Set crypto policies inside the target userspace container.
2025-06-27 04:16:40.184 ERROR    PID: 60438 leapp.workflow.TargetTransactionCheck.target_userspace_crypto_policies: Missing the TargetUserSpaceInfo message. Probably it has not been created before.
====> * adjust_local_repos
        Adjust local repositories to the target user-space container.
2025-06-27 04:16:40.255 ERROR    PID: 60487 leapp.workflow.TargetTransactionCheck.adjust_local_repos: Missing required information to proceed!
  • The /var/log/leapp/leapp-report.txt reports the following error.
# /var/log/leapp/leapp-report.txt
Risk Factor: high (inhibitor)
Title: Cannot find required basic RHEL target repositories.
Summary: This can happen when a repository ID was entered incorrectly either while using the --enablerepo option of leapp or in a third party actor that produces a CustomTargetRepositoryMessage.
Related links:
    - RHEL 7 to RHEL 8 LEAPP Upgrade Failing When Using Red Hat Satellite: https://access.redhat.com/solutions/5392811
    - Preparing for the upgrade: https://red.ht/preparing-for-upgrade-to-rhel9
Remediation: [hint] It is required to have RHEL repositories on the system provided by the subscription-manager unless the --no-rhsm option is specified. You might be missing a valid SKU for the target system or have a failed network connection. Check whether your system is attached to a valid SKU that is providing RHEL 9 repositories. If you are using Red Hat Satellite, read the upgrade documentation to set up Satellite and the system properly.

Environment

  • Red Hat Enterprise Linux 8
  • Leapp

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content