Description of problem:
Now oc prioritizes Podman's registry credentials over docker credentials: Defaults to ${XDG_RUNTIME_DIR}/containers/auth.json, /run/containers/${UID}/auth.json, ${XDG_CONFIG_HOME}/containers/auth.json, ${DOCKER_CONFIG}, ~/.docker/config.json, ~/.dockercfg. For oc-mirror better to same as oc for the registry credentials .
Version-Release number of selected component (if applicable):
oc-mirror version WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version. Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0-202405110441.p0.g2cb9f07.assembly.stream.el9-2cb9f07", GitCommit:"2cb9f07e5d07f5fa89ad44d65dada3f10cb0d939", GitTreeState:"clean", BuildDate:"2024-05-11T10:32:09Z", GoVersion:"go1.21.9 (Red Hat 1.21.9-1.el9_4) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
How reproducible:
always
Steps to Reproduce:
1) set docker registry credentials not contain the full authentications; 2) podman credentials contain the full auth; 3) run the oc-mirror command
Actual results:
3) the command faile:
error: unable to retrieve source image registry.redhat.io/openshift4/ose-kube-rbac-proxy manifest sha256:ac54cb8ff880a935ea3b4b1efc96d35bbf973342c450400d6417d06e59050027: Get "https://registry.redhat.io/v2/openshift4/ose-kube-rbac-proxy/manifests/sha256:ac54cb8ff880a935ea3b4b1efc96d35bbf973342c450400d6417d06e59050027": unauthorized: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication
Expected results:
oc-mirror should same as oc : prioritizes Podman's registry credentials over docker credentials