OpenShift - Sign into registry.redhat.io using the podman login command

Before using the podman login command to sign into registry.redhat.io, the following curl command can be used to determine if your username and password for registry.redhat.io are valid.

curl --location --user <username>:<password> "https://sso.redhat.com/auth/realms/rhcc/protocol/redhat-docker-v2/auth?service=docker-registry&client_id=curl&scope=repository:rhel:pull" -v

 

If you are using a proxy server, the --proxy and --proxy-user options can be included.

curl
--location
--proxy <hostname or ip address of your proxy server>:<port>
--proxy-user <proxy server username>:<proxy server password>
--user <Red Hat username>:<Red Hat password>
"https://sso.redhat.com/auth/realms/rhcc/protocol/redhat-docker-v2/auth?service=docker-registry&client_id=curl&scope=repository:rhel:pull"
-v

 

If the login fails, the following should be returned.

< HTTP/1.1 401 Unauthorized

 

If the login is successful, the following should be returned.

< HTTP/1.1 200 OK

 

The podman login command can be used to sign into registry.redhat.io. 

AVOID TROUBLE

If "cannot clone: Invalid argument" is returned and you are not using sudo, try including sudo.

~]$ sudo podman login registry.redhat.io
Username:
Password: 
Login Succeeded!

 

Optionally, the -u or --username and -p or --password options can be included.

~]$ sudo podman login --username john.doe registry.redhat.io
Login Succeeded!

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 6afab in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |