RHEL 8 yum update gives 403 errors

Starting a RHEL 8 VM I haven’t started for a while I got the following errors trying a ‘yum update’ :

Updating Subscription Management repositories.

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 78 B/s | 468 B 00:05
Errors during downloading metadata for repository 'rhel-8-for-x86_64-appstream-rpms':
- Status code: 403 for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/repodata/repomd.xml (IP: 95.101.84.251)
Error: Failed to download metadata for repo 'rhel-8-for-x86_64-appstream-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Piecing together multiple suggestions, e.g. from here, I needed to clear my last subscription registration and re-register:

sudo subscription-manager clean
sudo subscription-manager register --username [redhat account id]

After re-registering, ‘yum update’ now works as expected.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.