将主机注册到 satellite 服务器后,存储库后没有启用,错误:There are no enabled repositories in "/etc/yum.repos.d"
Issue
-
使用 curl 命令从注册模板将内容主机注册到 Satellite 时可能会出现此消息:
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'
-
当尝试使用激活码注册时,/etc/rhsm/rhsm.conf 文件可能会被更改为已订阅。但是,启用存储库失败:
[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.