Mirroring images to the local registry fails in an air-gapped environment

Symptom

In step, Mirror images to final location and configure the cluster, the Mirror images to the local image registry step fails with the following error:

skopeo , 202copy --all --authfile "/root/.airgap/auth.json" --dest-tls-verify=false --src-tls-verify=false docker://cp.icr.io/cp/apic/ibm-apiconnect-analytics-analytics-client@sha256:14c5a5dc9b02f1b55bf226a6932ea5f87329f5c4d1c91e54d7abc42fe928f057 docker://172.16.0.10:5000/cp/apic/ibm-apiconnect-analytics-analytics-client:10.0.1.1
time="2021-06-11T17:05:17Z" level=fatal msg="Error initializing source docker://cp.icr.io/cp/apic/ibm-apiconnect-analytics-analytics-client@sha256:14c5a5dc9b02f1b55bf226a6932ea5f87329f5c4d1c91e54d7abc42fe928f057: unable to retrieve auth token: invalid username/password: unauthorized: The login credentials are not valid, or your IBM Cloud account is not active."

Cause

Your entitlement key is missing in order to mirror the images from your public repository.

Solution

Provide your entitlement key to mirror the images from the public repository.

  1. Run the following command:
oc ibm-pak case launch
  --case $HOME/offline/$CASE_ARCHIVE
  --inventory $CASE_INVENTORY_SETUP
  --action configure-creds-airgap
  --args "--registry cp.icr.io --user cp --pass <insert_your_entitlement_key>"
  1. Retry the mirror command.

The mirror command should work and your local registry should be set.