为什么在尝试从 Quay.io 镜像 OKD 安装映像时出现此 "unauthorized" 错误?

Why am I getting this "unauthorized" error when trying to mirror OKD installation images from Quay.io?

我一直致力于在气隙环境中安装 OKD。第一个主要步骤是镜像 OKD 映像,以便可以将它们移动到新环境并在本地拉取。我一直在关注 OpenShift documentation and this article, as well as this resource 的组合来设置我的证书。我一直在取得缓慢但持续的进步。

但是,我现在在尝试使用

实际镜像文件时遇到了问题
oc adm -a ${LOCAL_SECRET_JSON} release mirror \ 
--from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE} \ 
--to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \ 
--to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE}

我收到以下令人鼓舞的回复:

info: Mirroring 120 images to host.okd-registry.dns:5000/ocp4/openshift4 ...

之后是 blobs:manifests: 行,最后是

stats: shared=0 unique=7 size=105.3MiB ratio=1.00

然后我得到大约 50 行说明

error: unable to retrieve source image quay.io/openshift-release-dev/ocp-v4.0-art-dev manifest
sha256:{some value}: unauthorized: access to the requested resource is not authorized

我有一个 quay 帐户,但我不确定在我研究之后是否需要它,如果需要,我将在哪里或如何登录它。我尝试使用 oc login 后跟发布结构中的各种地址来这样做,但如果这是解决方案,我可能使用了错误的参数,因为我找不到任何关于这样做的说明。

我也尝试过 sudo 的命令。我怀疑这是个问题,但我还是试过了。

我想问题可能出在我的证书上,但我不确定如何确定是否属于这种情况。

如有任何指导或建议,我们将不胜感激。

在我发布此答案时已确定 OKD 文档不准确,并指示读者从 OCP 图像存储库而不是 OKD 存储库中提取,这显然需要额外的凭据。已记录错误,希望尽快更新文档。

镜像正确的环境变量和完整命令如下:

LOCAL_REGISTRY=localhost:5000 (or your local domain name and port for the registry)
LOCAL_REPOSITORY=okd
LOCAL_SECRET_JSON=<full path to your pull secret>
OCP_RELEASE=4.5.0-0.okd-2020-10-15-235428
PRODUCT_REPO=openshift
RELEASE_NAME=okd
ARCHITECTURE=not-used-in-okd


oc adm -a ${LOCAL_SECRET_JSON} release mirror \
--from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE} \
--to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
--to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE} --dry-run