Migration from Redhat8 to Rocky fails during repository check

I’m trying to migrate my Redhat 8.7 Machine to Rocky. Howver it fails on line 446 with the error:

./migrate2rocky.sh -r
migrate2rocky - Begin logging at Thu 29 Jun 2023 11:25:26 AM CEST.

Updating Subscription Management repositories.

Removing dnf cache
Preparing to migrate Red Hat Enterprise Linux 8.7 (Ootpa) to Rocky Linux 8.

Determining repository names for Red Hat Enterprise Linux 8.7 (Ootpa)......

Found the following repositories which map from Red Hat Enterprise Linux 8.7 (Ootpa) to Rocky Linux 8:


Getting system package names for Red Hat Enterprise Linux 8.7 (Ootpa)./migrate2rocky.sh: line 446: repoinfo_results_cache: bad array subscript
Error: Unknown repo: ''

Failed to fetch info for repository .

An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.

 A log of this installation can be found at /var/log/migrate2rocky.log

It seems that no repositories are found.

1 Like

Hi all,

It is an old thraed, but without answer. I have the same exact problem while trying to migrate from RHEL 8.9 Ooopta (which is no more supported), to rockylinux.

Does someone has a suggestion for this problem ?

Here are the short log of the migration :slight_smile:


# cat /var/log/migrate2rocky.log
migrate2rocky - Begin logging at mar. 11 nov. 2025 17:12:01 CET.

Updating Subscription Management repositories.

Removing dnf cache
Preparing to migrate Red Hat Enterprise Linux 8.9 (Ootpa) to Rocky Linux 8.

Determining repository names for Red Hat Enterprise Linux 8.9 (Ootpa)…

Found the following repositories which map from Red Hat Enterprise Linux 8.9 (Ootpa) to Rocky Linux 8:

Getting system package names for Red Hat Enterprise Linux 8.9 (Ootpa)./migrate2rocky.sh: line 446: repoinfo_results_cache: bad array subscript
Error: Unknown repo: ‘’

Failed to fetch info for repository .

An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.


I did nod find any hint for this problem after doing a research on internet…

I can add that the rhel.repo is empty :slight_smile:


# cat redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos