After registering host to satellite server repositories are not enabled Error: There are no enabled repositories in "/etc/yum.repos.d"

Solution Verified - Updated -

Issue

  • This message may appear while registering a Content Host to a Satellite using the curl command from the registration template:

    Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d". 
    Host [root@host] initial configuration failed
    Description
    Getting below error when we are adding new Red Hat  server to satellite server
    Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
    
    [root@host /]# dnf_-C_repolist_--verbose
    Error: Cache-only enabled but no cache for 'rhel-9-for-x86_64-appstream-rpms'
    
  • When attempting to register using an activation key, the /etc/rhsm/rhsm.conf file may be altered to appear subscribed. But, enabling repositories fails:

    [root@server.example.com ~]# subscription-manager register --org="Example" --activationkey="RHEL-9-EXAMPLE"
    The system has been registered with ID: 12345-xxxx-xxxx-xxxxxxx
    The registered system name is: server.example.com
    [root@server.example.com ~]# subscription-manager repos --enable rhel-9-for-x86_64-baseos-rpms --enable rhel-9- for-x86_64-appstream-rpms
    This system has no repositories available through subscriptions.
    

Environment

  • Red Hat Satellite 6

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