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

Make the transparency log upload non-fatal. #1116

Merged
merged 1 commit into from
Dec 1, 2021

Commits on Dec 1, 2021

  1. Make the transparency log upload non-fatal.

    When keyless signing a private image today we prompt the user about uploading to Rekor, but in automation this prompt fails and on error this code panics (today).
    
    This change rewords the prompt, and makes the error path non-fatal (emits a WARNING, see below):
    
    ```
    COSIGN_EXPERIMENTAL=true cosign sign ghcr.io/mattmoor/bundles < /dev/null
    Generating ephemeral keys...
    Retrieving signed certificate...
    Non-interactive mode detected, using device flow.
    Enter the verification code MVRL-JKVG in your browser at: https://oauth2.sigstore.dev/auth/device?user_code=MVRL-JKVG
    Code will be valid for 300 seconds
    Token received!
    Successfully verified SCT...
    "ghcr.io/mattmoor/bundles" appears to be a private repository, please confirm uploading to the transparency log at "https://rekor.sigstore.dev" [Y/N]:
    WARNING: skipping transparency log upload (use --force to upload from scripts): EOF
    MEYCIQCnyOa+oSLABA07Eb79eJ0/fmN0o0mUKUEXok/j3l7A3AIhAOH/fk7/bG8rO7mid2Iys4KIx8HKwznDbAAsO0sYHRWUmain
    ```
    
    After this change, it should be possible to use cosign in keyless mode without `--force` on private images!
    
    Signed-off-by: Matt Moore <[email protected]>
    mattmoor committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    491cd1a View commit details
    Browse the repository at this point in the history