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

use lowercase imageRef since docker does not support capital letters #1408

Closed
bobcallaway opened this issue Feb 6, 2022 · 3 comments · Fixed by #1409
Closed

use lowercase imageRef since docker does not support capital letters #1408

bobcallaway opened this issue Feb 6, 2022 · 3 comments · Fixed by #1409
Assignees
Labels
bug Something isn't working

Comments

@bobcallaway
Copy link
Member

Per issue reported in sigstore/cosign-installer, docker push doesn't support references with uppercase characters.

bcallaway@bcallaway01:~/git/sigstore/cosign$ COSIGN_EXPERIMENTAL=1 ./cosign sign ghcr.io/bobcallaway/Custom-Error-Page@sha256:0dd6830f13edeb8a272586a5fe39a15dc3a0a8308be467c9117e7355c5ad9a68
Generating ephemeral keys...
Retrieving signed certificate...
Your browser will now be opened to:
https://oauth2.sigstore.dev/auth/auth?access_type=online&client_id=sigstore&code_challenge=L7k6KnuoCh8MizCXno9R7TJvO7fiZiSYVfG0abWRY_8&code_challenge_method=S256&nonce=24klxgjpuRfR63Y4TzvOoAQN7Hw&redirect_uri=http%3A%2F%2Flocalhost%3A35411%2Fauth%2Fcallback&response_type=code&scope=openid+email&state=24klxjEVeLvfgKtoxNzfF6sMHDD
Successfully verified SCT...
Error: signing [ghcr.io/bobcallaway/Custom-Error-Page@sha256:0dd6830f13edeb8a272586a5fe39a15dc3a0a8308be467c9117e7355c5ad9a68]: parsing reference: could not parse reference: ghcr.io/bobcallaway/Custom-Error-Page@sha256:0dd6830f13edeb8a272586a5fe39a15dc3a0a8308be467c9117e7355c5ad9a68
main.go:46: error during command execution: signing [ghcr.io/bobcallaway/Custom-Error-Page@sha256:0dd6830f13edeb8a272586a5fe39a15dc3a0a8308be467c9117e7355c5ad9a68]: parsing reference: could not parse reference: ghcr.io/bobcallaway/Custom-Error-Page@sha256:0dd6830f13edeb8a272586a5fe39a15dc3a0a8308be467c9117e7355c5ad9a68

There isn't really a useful error message to assist in debugging.

We can either check for uppercase characters and fail with a helpful error message, or we could transform the image ref to be in all lowercase characters before pushing the signature.

@bobcallaway bobcallaway added the bug Something isn't working label Feb 6, 2022
@bobcallaway bobcallaway self-assigned this Feb 6, 2022
bobcallaway added a commit to bobcallaway/cosign that referenced this issue Feb 6, 2022
Fixes: sigstore#1408

Signed-off-by: Bob Callaway <bob.callaway@gmail.com>
@dlorenc
Copy link
Member

dlorenc commented Feb 6, 2022

cc @mattmoor @jonjohnsonjr I thought we saw this back in December and fixed it in ggcr somewhere...

@mattmoor
Copy link
Member

mattmoor commented Feb 6, 2022

We didn’t because the starter action uses some metadata action to normalize instead

@dlorenc
Copy link
Member

dlorenc commented Feb 6, 2022

Ah whoops!

dlorenc pushed a commit that referenced this issue Feb 7, 2022
Fixes: #1408

Signed-off-by: Bob Callaway <bob.callaway@gmail.com>
hatmarch pushed a commit to hatmarch/cosign that referenced this issue Apr 19, 2022
Fixes: sigstore#1408

Signed-off-by: Bob Callaway <bob.callaway@gmail.com>
Ender-events added a commit to Ender-events/self-host-backup that referenced this issue Apr 30, 2022
mlieberman85 pushed a commit to mlieberman85/cosign that referenced this issue May 6, 2022
Fixes: sigstore#1408

Signed-off-by: Bob Callaway <bob.callaway@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants