How to pull images from registry.redhat.io for docker or s2i build?

Solution Unverified - Updated -

Issue

  • Pulling Red Hat ubi image from openshift namespace using image stream doesn't work with dockerFile build via git repository.
  • It shows an invalid username/password even the build process happened inside of openshift.
Adding cluster TLS certificate authority to trust store
Cloning "https://gitlab.example.com/projects/test/s2i-php74-nginx.git" ...
    Commit: 631c374780094feed53dbxxxxxxxxxxxxxxxxxxxxx (Dockerfile Reverting image tag.)
    Author: Red Hat Test <techsupport@redhat.com>
    Date:   Wed Sep 1 17:54:41 2021 -0400
Adding cluster TLS certificate authority to trust store
Adding cluster TLS certificate authority to trust store
Caching blobs under "/var/cache/blobs".

Pulling image ubi8/php-74 ...
Warning: Pull failed, retrying in 5s ...
Warning: Pull failed, retrying in 5s ...
Warning: Pull failed, retrying in 5s ...
error: build error: failed to pull image: After retrying 2 times, Pull image still failed due to error: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

Environment

  • Red Hat OpenShift Container Platform
    • 3.x
    • 4.x

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