...
1## cosign generate
2
3Generates (unsigned) signature payloads from the supplied container image.
4
5### Synopsis
6
7Generates an unsigned payload from the supplied container image and flags.
8This payload matches the one generated by the "cosign sign" command and can be used if you need
9to sign payloads with your own tooling or algorithms.
10
11```
12cosign generate [flags]
13```
14
15### Examples
16
17```
18 cosign generate [--a key=value] <image uri>
19
20 # Generate a simple payload for an image
21 cosign generate <IMAGE>
22
23 # Generate a payload with specific annotations
24 cosign generate -a foo=bar <IMAGE>
25
26 # Use this payload in another tool
27 gpg --output image.sig --detach-sig <(cosign generate <IMAGE>)
28```
29
30### Options
31
32```
33 --allow-http-registry whether to allow using HTTP protocol while connecting to registries. Don't use this for anything but testing
34 --allow-insecure-registry whether to allow insecure connections to registries (e.g., with expired or self-signed TLS certificates). Don't use this for anything but testing
35 -a, --annotations strings extra key=value pairs to sign
36 --attachment-tag-prefix [AttachmentTagPrefix]sha256-[TargetImageDigest].[AttachmentName] optional custom prefix to use for attached image tags. Attachment images are tagged as: [AttachmentTagPrefix]sha256-[TargetImageDigest].[AttachmentName]
37 -h, --help help for generate
38 --k8s-keychain whether to use the kubernetes keychain instead of the default keychain (supports workload identity).
39 --registry-password string registry basic auth password
40 --registry-token string registry bearer auth token
41 --registry-username string registry basic auth username
42```
43
44### Options inherited from parent commands
45
46```
47 --output-file string log output to a file
48 -t, --timeout duration timeout for commands (default 3m0s)
49 -d, --verbose log debug output
50```
51
52### SEE ALSO
53
54* [cosign](cosign.md) - A tool for Container Signing, Verification and Storage in an OCI registry.
55
View as plain text