无法使用 Openshift CLI 执行镜像 - OC

Unable to perform mirror image using Openshift CLI - OC

我正在尝试 install Openshift Container Platform (OCP) in restricted network. However, I've been struggling at the prerequisite step where I have to create a mirror registry to store the data following this instruction

我使用自签名证书授权和设置变量创建了 docker 注册表,如图所示。当我使用 OC CLI 运行 以下命令时出现错误:

sudo oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror "file://openshift/release:${OCP_RELEASE}*" ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}

错误:

error: unable to connect to 192.168.100.215:5000/repo: Get "https://192.168.100.215:5000/v2/": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "192.168.100.215")

我认为 OC 不信任我的证书,但是当我尝试添加 --certificate-authorty=/certs/domain.crt (我的自签名证书) 仍然出现同样的错误。

有没有办法解决这个问题,万分感谢!!

ps:我是 Redhat Openshift 新手

在您的命令中添加以下选项以跳过证书验证:--insecure-skip-tls-verify=true