red hat无法更新订阅存储库

red hat无法更新订阅存储库

问题描述:

  • Updating Subscription Management repositories.
  • Red Hat Enterprise Linux 8 for x86_64 – BaseOS (RPMs)                   
  • Errors during downloading metadata for repository ‘rhel-8-for-x86_64-baseos-rpms’:
  •   – Status code: 403 for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os/repodata/repomd.xml (IP: 0.0.0.0)
  • Error: Failed to download metadata for repo ‘rhel-8-for-x86_64-baseos-rpms’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

# sudo dnf update 更新订阅存储库,返回:

  • Red Hat Enterprise Linux 8 for x86_64 – BaseOS (RPM) 361 B/s | 360 B 00:00
  • 下载存储库“rhel-8-for-x86_64-baseos-rpms”的元数据时出错:
  • 无法下载 repo ‘rhel-8-for-x86_64-baseos-rpms’ 的元数据:无法下载 repomd.xml:无法下载 repodata/repomd.xml:并已尝试所有镜像

使用以下命令进行订阅管理器注册:

  • sudo subscription-manager register

如果系统已经注册,会返回:

  • This system is already registered. Use –force to override

该系统已经注册, 使用 –force 覆盖

使用命令–force,进行覆盖

进行覆盖后,会进行原来的系统注销,并删除所有本地数据

系统返回提示,要求您输入账户ID及密码进行系统注册。

输入账户ID及密码,返回提示:

系统已注册及ID号码

输入命令即可进行系统更新

  • Sudo dnf update

备注:

以上命令无效时,可以使用以下命令进行操作,更新red hat订阅存储库

[silky@silky.cn-0-10 ~]# sudo subscription-manager clean
已删除所有本地数据
[silky@silky.cn-0-10 ~]# subscription-manager register –username 用户名–password 账户密码 –auto-attach

正在注册到:subscription.rhsm.redhat.com:443/subscription

 

实际操作步骤:

  • [Debian@VOEL-0-15-SILKY ~]$ sudo subscription-manager register
  • This system is already registered. Use –force to override
  • [Debian @ VOEL-0-15-SILKY ~]$ sudo subscription-manager register –force
  • Unregistering from: subscription.rhsm.redhat.com:443/subscription
  • The system with UUID 00000000-0000-0000-0000-000000000000 has been unregistered
  • All local data removed
  • Registering to: subscription.rhsm.redhat.com:443/subscription
  • Username: 账户ID
  • Password: 账户密码
  • The system has been registered with ID: 00000000-0000-0000-0000-000000000000
  • The registered system name is: VOEL-0-15-SILKY