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

Add (skopeo generate-sigstore-key) #1869

Merged
merged 2 commits into from
Jan 23, 2023
Merged

Conversation

mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Jan 21, 2023

Depends on unmerged containers/image#1810 , missing documentation - see FIXMEs

@vrothberg PTAL.

func generateSigstoreKeyCmd() *cobra.Command {
var opts generateSigstoreKeyOptions
cmd := &cobra.Command{
Use: "generate-sigstore-key --output-prefix PREFIX",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure about the --output-prefix approach — an alternative is to have --output-public and --output--private, which is more explicit, but also much more typing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea 👍 Naming is always hard and I do not have another idea.

}

pubKeyPath := opts.outputPrefix + ".pub"
privateKeyPath := opts.outputPrefix + ".private"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.private or just .key?

.key is somewhat traditional, OTOH users publish private keys often enough that making that harder seems worthwhile.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 on .private. I am very likely such a user that would do it on low caffeine.

@mtrmac mtrmac force-pushed the generate-keys branch 2 times, most recently from 747ef09 to e3682f6 Compare January 21, 2023 14:20
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (minus docs)

func generateSigstoreKeyCmd() *cobra.Command {
var opts generateSigstoreKeyOptions
cmd := &cobra.Command{
Use: "generate-sigstore-key --output-prefix PREFIX",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea 👍 Naming is always hard and I do not have another idea.

}

pubKeyPath := opts.outputPrefix + ".pub"
privateKeyPath := opts.outputPrefix + ".private"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 on .private. I am very likely such a user that would do it on low caffeine.

@mtrmac
Copy link
Contributor Author

mtrmac commented Jan 23, 2023

Now vendors a merged c/image commit, and includes a man page.

Ready for review and possible merging.

@mtrmac mtrmac marked this pull request as ready for review January 23, 2023 15:38
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

besides the nit LGTM


## OPTIONS

**--output=prefix** _prefix_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**--output=prefix** _prefix_
**--output-prefix=prefix** _prefix_

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Fixed I think, not quite as suggested.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
But you may need a last wrestle with CI:

hack/man-page-checker
WARNING: skopeo generate-sigstore-key: man page shows '[options]', help does not show [command options]
make: *** [Makefile:245: validate-docs] Error 1

@mtrmac mtrmac force-pushed the generate-keys branch 2 times, most recently from ad7bf29 to f72493f Compare January 23, 2023 16:03
@mtrmac
Copy link
Contributor Author

mtrmac commented Jan 23, 2023

Sorry about that, the script doesn’t run on macOS. It is passing now.

@vrothberg vrothberg merged commit 61c519d into containers:main Jan 23, 2023
@mtrmac mtrmac deleted the generate-keys branch January 23, 2023 17:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants