Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when image is not found in registry #1410

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

imjasonh
Copy link
Member

@imjasonh imjasonh commented Feb 7, 2022

Before:

$ cosign sign gcr.io/imjasonh/aslkjdlfkjasdlkfjasf
...
Error: signing [gcr.io/imjasonh/aslkjdlfkjasdlkfjasf]: accessing entity: GET https://gcr.io/v2/imjasonh/aslkjdlfkjasdlkfjasf/manifests/latest: MANIFEST_UNKNOWN: Failed to fetch "latest" from request "/v2/imjasonh/aslkjdlfkjasdlkfjasf/manifests/latest".
main.go:46: error during command execution: signing [gcr.io/imjasonh/aslkjdlfkjasdlkfjasf]: accessing entity: GET https://gcr.io/v2/imjasonh/aslkjdlfkjasdlkfjasf/manifests/latest: MANIFEST_UNKNOWN: Failed to fetch "latest" from request "/v2/imjasonh/aslkjdlfkjasdlkfjasf/manifests/latest".

After:

$ go run ./cmd/cosign sign gcr.io/imjasonh/akjsldkfjalkjsdflkajsdf
...
Error: signing [gcr.io/imjasonh/akjsldkfjalkjsdflkajsdf]: accessing entity: entity not found in registry
main.go:46: error during command execution: signing [gcr.io/imjasonh/akjsldkfjalkjsdflkajsdf]: accessing entity: entity not found in registry

We might also want to fix the duplicate error message...

In any case, this error message should help indicate to users that the image doesn't exist in the registry, and if they're trying to sign an image they've built locally, they might need to push it.

Suggestions welcome about how to improve even further.

Signed-off-by: Jason Hall <jasonhall@redhat.com>
@dlorenc dlorenc merged commit 60f81b4 into sigstore:main Feb 7, 2022
@github-actions github-actions bot added this to the v1.6.0 milestone Feb 7, 2022
hatmarch pushed a commit to hatmarch/cosign that referenced this pull request Apr 19, 2022
)

Signed-off-by: Jason Hall <jasonhall@redhat.com>
mlieberman85 pushed a commit to mlieberman85/cosign that referenced this pull request May 6, 2022
)

Signed-off-by: Jason Hall <jasonhall@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants