'rhel-7-server-optional-rpms' does not match a valid repository ID

Latest response


I am encountering this problem on a RedHat 7.3 server. I run the command as follows:
- subscription-manager repos --enable rhel-7-server-optional-rpms and it returns and error as follows:
- Error: 'rhel-7-server-optional-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.

So here is output of subscription-manager repos --list
Available Repositories in /etc/yum.repos.d/redhat.repo
Repo ID: rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL: https://rhs1v.xxx/pulp/repos/xxxxxx/Library/content/dist/rhel/server/7/7.4/$basearch/os
Enabled: 1

Repo ID: rhel-7-server-satellite-tools-6.2-rpms
Repo Name: Red Hat Satellite Tools 6.2 (for RHEL 7 Server) (RPMs)
Repo URL: https://rhs1v.xxx/pulp/repos/xxxxxx/Library/content/dist/rhel/server/7/7Server/$basearch/sat-tools/6.2/os
Enabled: 1

Repo ID: rhel-7-server-extras-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)
Repo URL: https://rhs1v.xxx/pulp/repos/xxxxxx/Library/content/dist/rhel/server/7/7Server/$basearch/extras/os
Enabled: 1

Repo ID: rhel-7-server-rhn-tools-rpms
Repo Name: RHN Tools for Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL: https://rhs1v.xxx/pulp/repos/xxxxxx/Library/content/dist/rhel/server/7/7.4/$basearch/rhn-tools/os
Enabled: 0

Repo ID: rhel-server-rhscl-7-rpms
Repo Name: Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server
Repo URL: https://rhs1v.xxx/pulp/repos/xxxxxx/Library/content/dist/rhel/server/7/7.4/$basearch/rhscl/1/os
Enabled: 0

I have tried this on both my satellite server and the server where i want to enable the repository.

So how do I get it to match a valid Repository ID?

As always any help or guidance is greatly appreciated.



Hi Patrick,

Not sure, but I think to having read that the 'optional' repository is only available for the newest point release of the main edition.
So upgrade the server to - or better clean install (as recommended in our other discussion) - the latest stable edition RHEL 7.4. :)


Hello Christian,

So I need to update my RedHat Satellite Server to 7.4 then? What if this is not an option? Is there an alternative? The server I want to install it on is 7.4.

Regards, Patrick

Hi Patrick,

The latest edition of Red Hat Satellite is 6.2 and you said : "I am encountering this problem on a RedHat 7.3 server". :)


My RedHat Satellite version is 6.2. However it is running on a RedHat 7.3 Server. Sorry for confusion.

I am trying to install the rhel-7-server-optional-rpms on a totally different server running version 7.4 that a Developer is looking to test with.

So trying either the Satellite Server or the Developers Server does not work.

Well Patrick that is strange, I am running 7.4 and have the 'optional' repository enabled.
Please try to rebuild everything from scratch - unregister and re-register the system ->

sudo subscription-manager remove --all
sudo subscription-manager unregister
sudo subscription-manager clean

sudo subscription-manager register
sudo subscription-manager refresh
sudo subscription-manager attach --auto

sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo subscription-manager repos --enable rhel-7-server-optional-rpms
sudo subscription-manager repos --enable rhel-server-rhscl-7-rpms


worthy! thanks

You're welcome, Zoe ! :)

It works for me too! thanks!!

Great Cristian, glady ! :)

Worked for me too! Thank you!

You're welcome, Christian ! :)

I'm trying to do the exact procedure on RHEL7 build for Linux s390X in a Docker container and the problem persists. Any idea about that? Thanks in advance

My Satellite is on 7.3

Hi Patrick,

Then upgrade the server (on which your Satellite is on) to 7.4 or freshly install 7.4 and afterwards reinstall Satellite. :)



I think I figured it out. I went to the content/sync status on the satellite server and checked Red Hat Enterprise Linux 7 Server - Optional RPMs x86_64 7.4 and Red Hat Enterprise Linux 7 Server - Optional RPMs x86_64 7.4

Then I synchronized and was able to add the subscription-manager repos --enable rhel-7-server-optional-rpms and I believe it is now working but my developer will confirm that for me.

Thank you so much again Christian.

Great Patrick,

You're welcome ! I'm glad to read that you've got it done.

Cheers :)

Patrick, please let us know how it goes, if there is some other solution, please share, thanks!

Hello R. Hinton, I believe I managed to get it to work. The solution was on the satellite server where I enabled the repository per my comments above. Thank you.

Glad you got it sorted out!

my error message are : Error: 'rhel-7-server-rhv-4.2-manager-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. Error: 'rhel-7-server-rhv-4-managertools-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. Error: 'jb-eap-7-for-rhel-7-server-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. after unregister and re-register the system, there is no effect,what should i do?

Hi Chao,

Maybe this discussion thread might be a useful source to find a solution : Enable rhel-7-server-rhvh-4-rpms :)


Thank you for your reply. but No effect for me, I am very sure there is something wrong with my Subscription Pool, as mentioned in the install guild,Red Hat Virtualization Manager are required Red Hat Enterprise Linux Server and Red Hat Virtualization Subscription Pool,but when i registed my system,i could only find RHEL Server pool info,why have no Red Hat Virtualization subscription pool info? Addition, my system is RHEL 7.5, anything wrong?I need your help,thanks.

Hi Chao, you need to have a separate Red Hat Virtualization subscription if you want to use it. :)


I have registed as a developer, a developer has no Red Hat Virtualization subscription?

No Chao, the developer edition does not provide a (free) Red Hat Virtualization subscription. :)


How do I get a Red Hat Virtualization subscription, pay on the official website? or contact the sales person?

Hi Chao, both ways are okay, but I think contacting the sales team would be the best in your case. :)


Thanks,Christian. should i get a corporate account? or personal developer account to purchase related certificates?

Hi Chao, I don't think that it is necessary to create a new account to purchase these certificates. :)


Ok, thank you,Christian.

You're welcome, Chao ! :)

Hey guy; I have the same problem on rhel 7, It's says : Error: 'rhel-rs-for-rhel-7-server-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. Is this reposiotry no longer exist ?

Hello, I am installing Ansible Tower on RHEL 7.4, but when I execute the ./setup.sh script to complete installation, i get below two error messages. I have tried everything i can, with recommendations on this forum, but no success.

"Error: 'rhel-server-rhscl-7-rpms' does not match a valid repository ID "Error: 'rhel-7-server-extras-rpms' does not match a valid repository ID.

I need help.

Thanks, Rene.

Am not able to subscribe subscription-manager repos --enable=jb-eap-7.1-for-rhel-7-server-rpms it complains that its an invalid repos

Hello everyone,

I have a redhat 7.8 (Maipo) and it's dosen't work to me can you help me please ?

[thierry@XF200X ~]# sudo yum update
Loaded plugins: product-id, search-disabled-repos, subscription-manager
azure-cli                                                                                                   | 3.0 kB  00:00:00
epel/x86_64/metalink                                                                                        |  33 kB  00:00:00
rhel-7-server-extras-rpms                                                                                   | 3.4 kB  00:00:00
https://cdn.redhat.com/content/dist/rhel/server/7/%24releasever/x86_64/optional/os/repodata/repomd.xml: [Errno 14] 
HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article


If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

 One of the configured repositories failed (Red Hat Enterprise Linux 7 Server - Optional (RPMs)),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=rhel-7-server-optional-rpms ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable rhel-7-server-optional-rpms
        subscription-manager repos --disable=rhel-7-server-optional-rpms

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice

        yum-config-manager --save --setopt=rhel-7-server-optional-rpms.skip_if_unavailable=true

  failure: repodata/repomd.xml from rhel-7-server-optional-rpms: [Errno 256] No more mirrors to try.
  https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/x86_64/optional/os/repodata/repomd.xml: [Errno 14] HTTPS 
  Error 404 - Not Found
  [thierry@XF200X ~]#

Hi Flavio,

Please open a new discussion, for RHEL on system z is a sligtly different and replying to a post somewhere in the middle of the discussion is hard to find in a thread of almost 4 years old.


Jan Gerrit