ERROR AnchoreWorker anchore-engine add image failed.
ERROR AnchoreWorker anchore-engine add image failed. URL: http://URL_AE:8228/v1/images, status: HTTP/1.1 400 BAD REQUEST, error: { "detail": { "raw_exception_message": "could not get manifest/digest for image (docker_repo_url/adoptjdk:124) from registry (https://docker_repo_url) - error: Error encountered in skopeo operation. cmd=/bin/sh -c skopeo inspect --raw --tls-verify=false docker://docker_repo_url/adoptjdk:124, rc=1, stdout=None, stderr=b'time="2019-08-06T10:20:26Z" level=fatal msg="unable to retrieve auth token: invalid username/password" \n'" }, "httpcode": 400, "message": "cannot fetch image digest/manifest from registry" }
I am getting above message even after supply correct creds. Can someone help here
Hi @ghanshyams92,
I just have a couple of questions to get some more information.
What registry are you attempting to pull the image from to scan? From the output, it looks like you might be using one you have deployed (https://docker_repo_url).
Second, have you added the registry to the Anchore registries list with the corresponding username/password?
$ anchore-cli registry list
Registry User
docker.io anchore
quay.io anchore
registry.example.com johndoe
192.168.1.200:5000 janedoe
$ anchore-cli registry add docker_repo_url USERNAME PASSWORD
Here's a link for configuring and working with registries: https://docs.anchore.com/current/docs/using/cli_usage/registries/configuring_registries/
@blang9238 I get the same error when adding my registry using the documentation above:
# anchore-cli --debug --u admin --p foobar --debug --url http://engine-api:8228/v1 registry add 10.92.47.182:443 prahaladd Nokiaoracle890 --insecure INFO:anchorecli.clients.apiexternal:As Account = None DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): engine-api:8228 DEBUG:urllib3.connectionpool:http://engine-api:8228 "GET /v1 HTTP/1.1" 200 5 INFO:anchorecli.clients.apiexternal:As Account = None DEBUG:anchorecli.clients.apiexternal:POST url=http://engine-api:8228/v1/registries?validate=True DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): engine-api:8228 DEBUG:urllib3.connectionpool:http://engine-api:8228 "POST /v1/registries?validate=True HTTP/1.1" 406 332 DEBUG:anchorecli.cli.utils:fetched httpcode from response: 406 Error: cannot ping supplied registry with supplied credentials - exception: failed check to access registry (https://10.92.47.182:443,prahaladd) - exception: cannot login to registry user=prahaladd registry=https://10.92.47.182:443 - invalid username/password
I am trying to connct to a private repository
Hi @infominer75,
Are you able to successfully login to your Docker registry with:
# docker login -u <username> -p <password> 10.92.47.182:443?
I am having the same issue, and I am unsure what the docker registry credentials have to do with the anchore registry.
2022-10-17T21:31:39.104 ERROR AnchoreWorker anchore-engine add image failed. URL: http://my_ip:8228/v1/images, status: HTTP/1.1 400 BAD REQUEST, error: {
21:31:39 "detail": {
21:31:39 "error_codes": [
21:31:39 "SKOPEO_UNKNOWN_ERROR"
21:31:39 ],
21:31:39 "raw_exception_message": "Error encountered in skopeo operation. cmd=/bin/sh -c skopeo inspect --raw --tls-verify=false docker://docker.io/library/:latest, rc=1, stdout=None, stderr=b'time="2022-10-17T16:02:46Z" level=fatal msg="Error parsing image name \\"docker://docker.io/library/:latest\\": invalid reference format"\n', error_code=SKOPEO_UNKNOWN_ERROR"
21:31:39 },
21:31:39 "httpcode": 400,
21:31:39 "message": "cannot fetch image digest/manifest from registry"
21:31:39 }
21:31:39
21:31:39 2022-10-17T21:31:39.105 ERROR AnchorePlugin Failing Anchore Container Image Scanner Plugin step due to errors in plugin execution
21:31:39 hudson.AbortException: Failed to analyze :latest due to error adding image to anchore-engine. Check above logs for errors from anchore-engine
I am getting above message using same server anchore and registry(GitLab Container Registry). Can someone help here
regards, Mahesh