How to copy an image from the internal registry with skopeo running in a container using service account?

Solution Verified - Updated -

Issue

  • When running inside a container, command skopeo copy fails to copy image from internal registry to an external registry using below commands and options:
$ skopeo copy --src-tls-verify=false docker://image-registry.openshift-image-registry.svc:5000/<scr_project>/<scr_image_name>@<sha256:ID> docker://<external_registry>/<dest_project>/<dest_image_name>@sha256ID
FATA[0000] Error initializing source docker://image-registry.openshift-image-registry.svc:5000/<src_project>/<scr_image_name>@sha256:ID: Error reading manifest sha256:ID in image-registry.openshift-image-registry.svc:5000/<scr_project>/<scr_image_name>: unauthorized: authentication required

Environment

  • Red Hat OpenShift Container Platform
    • v4.5

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