1
0
mirror of https://github.com/docker/cli.git synced 2025-08-31 23:02:07 +03:00
Files
cli/docs/reference/commandline/trust_key_generate.md
Sebastiaan van Stijn f912deeec7 Fix whitespace that caused short-format in generated YAML
If the markdown contains trailing spaces, or has tabs included,
the YAML generator uses a compact format for the text (using `\n`
and `\t`, instead of plain newlines).

The compact format makes it difficult to review changes in the
yaml docs when vendoring in the documentation repository.

This patch:

- removes trailing whitespace
- replaces tabs for spaces
- fixes some minor formatting and markdown issues

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-15 15:37:23 +01:00

1.9 KiB

title, description, keywords
title description keywords
key generate The key generate command description and usage key, notary, trust

trust key generate

Usage:  docker trust key generate NAME

Generate and load a signing key-pair

Options:
      --dir string   Directory to generate key in, defaults to current directory
      --help         Print usage

Description

docker trust key generate generates a key-pair to be used with signing, and loads the private key into the local docker trust keystore.

Examples

Generate a key-pair

$ docker trust key generate alice

Generating key for alice...
Enter passphrase for new alice key with ID 17acf3c:
Repeat passphrase for new alice key with ID 17acf3c:
Successfully generated and loaded private key. Corresponding public key available: alice.pub
$ ls
alice.pub

The private signing key is encrypted by the passphrase and loaded into the docker trust keystore. All passphrase requests to sign with the key will be referred to by the provided NAME.

The public key component alice.pub will be available in the current working directory, and can be used directly by docker trust signer add.

Provide the --dir argument to specify a directory to generate the key in:

$ docker trust key generate alice --dir /foo

Generating key for alice...
Enter passphrase for new alice key with ID 17acf3c:
Repeat passphrase for new alice key with ID 17acf3c:
Successfully generated and loaded private key. Corresponding public key available: alice.pub
$ ls /foo
alice.pub