...
1## cosign generate-key-pair
2
3Generates a key-pair.
4
5### Synopsis
6
7Generates a key-pair for signing.
8
9```
10cosign generate-key-pair [flags]
11```
12
13### Examples
14
15```
16 cosign generate-key-pair [--kms KMSPATH]
17
18 # generate key-pair and write to cosign.key and cosign.pub files
19 cosign generate-key-pair
20
21 # generate key-pair and write to custom named my-name.key and my-name.pub files
22 cosign generate-key-pair --output-key-prefix my-name
23
24 # generate a key-pair in Azure Key Vault
25 cosign generate-key-pair --kms azurekms://[VAULT_NAME][VAULT_URI]/[KEY]
26
27 # generate a key-pair in AWS KMS
28 cosign generate-key-pair --kms awskms://[ENDPOINT]/[ID/ALIAS/ARN]
29
30 # generate a key-pair in Google Cloud KMS
31 cosign generate-key-pair --kms gcpkms://projects/[PROJECT]/locations/global/keyRings/[KEYRING]/cryptoKeys/[KEY]
32
33 # generate a key-pair in Hashicorp Vault
34 cosign generate-key-pair --kms hashivault://[KEY]
35
36 # generate a key-pair in Kubernetes Secret
37 cosign generate-key-pair k8s://[NAMESPACE]/[NAME]
38
39 # generate a key-pair in GitHub
40 cosign generate-key-pair github://[OWNER]/[PROJECT_NAME]
41
42 # generate a key-pair in GitLab with project name
43 cosign generate-key-pair gitlab://[OWNER]/[PROJECT_NAME]
44
45 # generate a key-pair in GitLab with project id
46 cosign generate-key-pair gitlab://[PROJECT_ID]
47
48CAVEATS:
49 This command interactively prompts for a password. You can use
50 the COSIGN_PASSWORD environment variable to provide one.
51```
52
53### Options
54
55```
56 -h, --help help for generate-key-pair
57 --kms string create key pair in KMS service to use for signing
58 --output-key-prefix cosign name used for generated .pub and .key files (defaults to cosign) (default "cosign")
59```
60
61### Options inherited from parent commands
62
63```
64 --output-file string log output to a file
65 -t, --timeout duration timeout for commands (default 3m0s)
66 -d, --verbose log debug output
67```
68
69### SEE ALSO
70
71* [cosign](cosign.md) - A tool for Container Signing, Verification and Storage in an OCI registry.
72
View as plain text