Files
docker-cli/docs/reference/commandline/trust_key_load.md
Sebastiaan van Stijn f2e79b826c docs: use "console" code-hint for shell examples
This replaces the use of bash where suitable, to allow easier copy/pasting
of shell examples without copying the prompt or process output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 47ba76afb1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-06 16:48:53 +02:00

50 lines
1.1 KiB
Markdown

---
title: "key load"
description: "The key load command description and usage"
keywords: "key, notary, trust"
---
# trust key load
```markdown
Usage: docker trust key load [OPTIONS] KEYFILE
Load a private key file for signing
Options:
--help Print usage
--name string Name for the loaded key (default "signer")
```
## Description
`docker trust key load` adds private keys to the local docker trust keystore.
To add a signer to a repository use `docker trust signer add`.
## Examples
### Load a single private key
For a private key `alice.pem` with permissions `-rw-------`
```console
$ docker trust key load alice.pem
Loading key from "alice.pem"...
Enter passphrase for new signer key with ID f8097df:
Repeat passphrase for new signer key with ID f8097df:
Successfully imported key from alice.pem
```
To specify a name use the `--name` flag:
```console
$ docker trust key load --name alice-key alice.pem
Loading key from "alice.pem"...
Enter passphrase for new alice-key key with ID f8097df:
Repeat passphrase for new alice-key key with ID f8097df:
Successfully imported key from alice.pem
```