-
Notifications
You must be signed in to change notification settings - Fork 531
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
cosign generate-key-pair github://my-org/my-repo does not store the secrets accordingly in github #1431
Labels
bug
Something isn't working
Comments
marcofranssen
changed the title
cosign cosign generate-key-pair github://my-org/my-repo does not store the secrets accordingly in github
cosign generate-key-pair github://my-org/my-repo does not store the secrets accordingly in github
Feb 10, 2022
I'm experiencing the same problem, with
|
This is (surprisingly) still an issue with Cosign 1.9. |
Relevant code here: cosign/pkg/cosign/git/github/github.go Lines 44 to 137 in b01a173
See google/go-github#1607 for what I think we need to do to fix it. We should definitely fix this here ASAP, but I'd also be interested in sending a patch upstream to
|
on it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When generating a keypair like this the keys are not accordingly set in the GitHub secrets.
export GITHUB_TOKEN=my_token $ cosign cosign generate-key-pair github://my-org/my-repo Private key written to COSIGN_PASSWORD environment variable Private key written to COSIGN_PRIVATE_KEY environment variable Public key written to COSIGN_PUBLIC_KEY environment variable Public key also written to cosign.pub
This is tested with following workflow.
This workflow results in printing the following in the logs.
Also when trying to echo the generated keypairs from the shell where I ran the command
generate-keypair
it seems the environment variables are not set.However when generating key as following does show there is a secret.
Then I simply update the secrets in Github by copy pasting the file contents.
When I run the workflow now it shows as following in the logs.
This might be caused by the version bump of the github package a while ago.
The text was updated successfully, but these errors were encountered: