OpenShift Operator Catalog mirror to GitLab Container Registry fails

Solution In Progress - Updated -

Issue

Mirroring the Operator Catalog to a GitLab Container Registry fails with the below error message.

denied: requested access to the resource is denied
unauthorized: authentication required

info: Mirroring completed in 560ms (0B/s)
error mirroring image: one or more errors occurred while uploading images

Mirroring was carried out by performing the steps outlined in the Mirroring an Operator Catalog documentation

$ export LOCAL_REGISTRY="registry.example.com"
$ export REG_CREDS="~/.docker/config.json"
$ oc adm catalog mirror registry.redhat.io/redhat/redhat-operator-index:v4.6 registry.example.com.au/some/path/ocp4/olm4-6 -a ${REG_CREDS} --filter-by-os="linux/amd64"

Authentication to the registry using the same credentials works via Podman:

$ podman login --authfile ${REG_CREDS} ${LOCAL_REGISTRY}
Authenticating with existing credentials...
Existing credentials are valid. Already logged in to registry.example.com:5000

Environment

  • OpenShift Container Platform 4
  • GitLab Container Registry

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In