首页 > 解决方案 > 将图像添加到自签名注册表失败。锚定引擎

问题描述

将图像添加到自签名注册表失败。尝试将注册表添加为不安全,即使它们是私有注册表的正确凭据,命令也不会获取凭据。尝试了 --skip-validate 标志并且能够添加注册表,但是当尝试添加要分析的图像时,会出现错误。

[2330fd6 anchore-engine]$ anchore-cli --u admin --p ***** registry add myregistry.com:5000 anchore anchore --insecure
Error: cannot ping supplied registry with supplied credentials - exception: failed check to access registry (https://myregistry.com:5000,anchore) - exception: cannot access registry using registry version 2 https://myregistry.com:5000:5000/v2/
HTTP Code: 406
Detail: {'error_codes': []}

[2330fd6 anchore-engine]$ anchore-cli --u admin --p ***** registry add myregistry.com:5000 anchore anchore --insecure
Error: cannot ping supplied registry with supplied credentials - exception: failed check to access registry (https://myregistry.com:5000,anchore) - exception: cannot access registry using registry version 2 https://myregistry.com:5000/v2/
HTTP Code: 406
Detail: {'error_codes': []}

[2330fd6 anchore-engine]$ anchore-cli --u admin --p ***** registry add myregistry.com:5000 anchore anchore --insecure --skip-validate
Registry: myregistry.com:5000
Name: myregistry.com:5000
User: anchore
Type: docker_v2
Verify TLS: False
Created: 2021-04-14T16:09:57Z
Updated: 2021-04-14T16:09:57Z

Error: No such command "image".
[2330fd6 anchore-engine]$ anchore-cli --u admin --p ***** image add nmyregistry.com:5000/ubuntu:18.04
Error: cannot fetch image digest/manifest from registry
HTTP Code: 400
Detail: {'error_codes': ['SKOPEO_UNKNOWN_ERROR'], 'raw_exception_message': 'Error encountered in skopeo operation. cmd=/bin/sh -c skopeo inspect --raw --tls-verify=false --creds "${SKOPUSER}":"${SKOPPASS}" docker://nexus3.mmi.mig.corp:5000/migubuntu:18.04, rc=1, stdout=None, stderr=b'time="2021-04-14T16:11:10Z" level=fatal msg="Error parsing image name \\"docker://myregistry.com:5000/ubuntu:18.04\\": error pinging docker registry myregistry.com:5000:5000: Get \\"http://myregistry.com:5000:5000/v2/\\\\": EOF"\n', error_code=SKOPEO_UNKNOWN_ERROR'}

标签: dockerregistry

解决方案


推荐阅读