Open pbalogh-sa opened 3 years ago
Thanks @pbalogh-sa .Can you confirm if this is present in engine 0.9.0 as well?
The bug is present in engine 0.9.0 as well.
version: Engine DB Version: 0.0.14 Engine Code Version: 0.9.0
The response was the same:
Error: cannot ping supplied registry with supplied credentials - exception: failed check to access registry (https://602401143452.dkr.ecr.eu-west-2.amazonaws.com,) - exception: cannot access/parse registry metadata for awsecr registry type - exception: 'registry_meta'
HTTP Code: 406
Detail: {'error_codes': []}
Thanks @pbalogh-sa for following up
@pbalogh-sa are you giving a docker username/password there for an ECR registry? For ECR you can use an accesskey and secret key or give it an iam role to use. Options are detailed here: https://engine.anchore.io/docs/usage/cli_usage/registries/ecr_configuration/. Which method are you using? That will help with triage and debugging.
This appears to be specific to the awsecr type. I don't see this behavior against DockerHub or other credential types.
I added the awsecr type registry using aws access key and secret access key.
anchore-cli add --registry-type awsecr xxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY
After it, I tried to update using the access key and secret access key again:
anchore-cli update --registry-type awsecr xxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY
@pbalogh-sa thanks, I'll target this for the next release after 0.9.1, its too late to make that release. Until then, can you remove and then re-add the new credential?
This isn't going to make 0.9.2, I'm going to re-target it for the next release after that.
BUG REPORT : Anchore-engine cannot update registries
Version of Anchore Engine and Anchore CLI if applicable: anchore-engine:
anchore-cli:
What happened:
What did you expect to happen: Registry update should work.
Any relevant log output from /var/log/anchore:
How to reproduce the issue: Try to update a registry