Running sudo before Buildah while logging in a registry results in a failure

Solution Verified - Updated -

Issue

$ sudo podman login -u abc https://registry.redhat.io
Password: 
Login Succeeded!

$ sudo podman login --get-login https://registry.redhat.io
abc

$ sudo buildah from registry.redhat.io/ubi8/ubi
Error initializing source docker://registry.redhat.io/ubi8/ubi:latest: unable to retrieve auth token: invalid username/password: unauthorized: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7

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