Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1660883

Summary: Missleading error on enable repo if the system is not registered
Product: Red Hat Enterprise Linux 7 Reporter: Irina Gulina <igulina>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: medium    
Version: 7.7-AltCC: cdonnell, csnyder, jsefler, khowell, skallesh, wpoteat
Target Milestone: rcKeywords: EasyFix, StringChange, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:22:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Irina Gulina 2018-12-19 13:58:01 UTC
Description of problem:
The error says that <name> doesn't match a valid repo ID and suggests to check "subscription-manager repos --list". The repo ID name is valid. It's just that the system has not been registered yet.

Version-Release number of selected component (if applicable):
>> cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.6 (Maipo)

How reproducible:
always

Steps to Reproduce:
1. don't register the system
2. 
>> sudo subscription-manager repos --enable=<some_valid_repo_name>

Error: 'some_valid_repo_name' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.

WARNING

The yum/dnf plugins: /etc/yum/pluginconf.d/subscription-manager.conf, /etc/yum/pluginconf.d/product-id.conf were automatically enabled for the benefit of Red Hat Subscription Management. If not desired, use "subscription-manager config 
3. 
>>sudo subscription-manager repos --list
This system has no repositories available through subscriptions.


Actual results:


Expected results:
I would appreciate the error: "This system has no repositories available through subscriptions." or similar at step #2 instead of the current error message. Otherwise, I think that I used a wrong repo name.

Comment 2 Kevin Howell 2019-01-14 15:26:34 UTC
Let's change the language to say the repo is "unavailable" rather than invalid.

Comment 7 Shwetha Kallesh 2020-04-16 06:39:11 UTC
Reproducer:
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager repos --enable rhel-7-server-openstack-13-rpms
Error: 'rhel-7-server-openstack-13-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.


Verification:

[root@hpe-dl380pgen8-02-vm-4 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.24.32

[root@hpe-dl380pgen8-02-vm-4 ~]# subscription-manager repos --enable rhel-7-server-openstack-13-rpms
This system has no repositories available through subscriptions.

Comment 9 errata-xmlrpc 2020-09-29 19:22:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (subscription-manager bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3866