cancel
Showing results for 
Search instead for 
Did you mean: 
  • 93 Views

ch05s04 - unauthorized access to the requested resource

I'm trying to pull and run the postgresql image from ocp like in this screenshot.

Simone_Gigante_0-1761905120556.png

When I launch the execution, it says that I'm not authorized. I tried to logout and then login again with the oc login command but nothing changed. What am I doing wrong?

1 Reply
Travis
Moderator
Moderator
  • 69 Views

@Simone_Gigante -

The problem has nothing to do with the OC command. You are using podman here and not OpenShift to launch a container. So the command to login to a container registry is podman login <registry> and you would provide the credentials.

Looking at your screenshot, it is trying to download an image directly from Red Hat's online registry which would be wrong for this course. 

I suspect a few things ... 

  • Possibly forgetting the lab start script
  • And more importantly you aren't specifying the actual registry in the command with podman run. You need to have registry.ocp4.example.com:8443/rhel8/postgresql-12:1-113 in the command with the FQDN of the registry and port and not just rhel8/postgresql-12:1-113 as that will go back to default registries, in this case Red Hat's container registry and possibly docker (depending on the podman configuration for registries).

I think if you make sure you run the start command, you will be authenticated to the classroom container registry, and more importantly, specifying the entire line with registry and container you want to use, it should then work.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Join the discussion
You must log in to join this conversation.