oc mirror fails with "authenticationrequired" error when connecting to registry.redhat.io

Solution Verified - Updated -

Issue

  • The oc mirror fails to mirror the images from the registry.redhat.io registry with the following error, even when the correct username and password for the Red Hat registry are used.:

    Error: authenticating creds for "registry.redhat.io": pinging container registry registry.redhat.io: Get "[https://registry.redhat.io/v2/](https://registry.redhat.io/v2/)": authenticationrequired
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4

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