2017-10-09 13:44:52 -04:00
|
|
|
# trust key load
|
2017-09-26 14:46:38 -04:00
|
|
|
|
2023-01-06 13:04:05 -05:00
|
|
|
<!---MARKER_GEN_START-->
|
2017-10-25 13:45:10 -04:00
|
|
|
Load a private key file for signing
|
2017-09-26 14:46:38 -04:00
|
|
|
|
2023-01-06 13:04:05 -05:00
|
|
|
### Options
|
|
|
|
|
|
|
|
| Name | Type | Default | Description |
|
|
|
|
|:---------|:---------|:---------|:------------------------|
|
|
|
|
| `--name` | `string` | `signer` | Name for the loaded key |
|
|
|
|
|
|
|
|
|
|
|
|
<!---MARKER_GEN_END-->
|
2017-09-26 14:46:38 -04:00
|
|
|
|
|
|
|
## Description
|
|
|
|
|
2023-12-13 09:16:56 -05:00
|
|
|
`docker trust key load` adds private keys to the local Docker trust keystore.
|
2020-03-15 10:11:43 -04:00
|
|
|
|
|
|
|
To add a signer to a repository use `docker trust signer add`.
|
2017-09-26 14:46:38 -04:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
### Load a single private key
|
|
|
|
|
|
|
|
For a private key `alice.pem` with permissions `-rw-------`
|
|
|
|
|
2021-08-21 08:54:14 -04:00
|
|
|
```console
|
2017-10-09 13:44:52 -04:00
|
|
|
$ docker trust key load alice.pem
|
2017-09-26 14:46:38 -04:00
|
|
|
|
|
|
|
Loading key from "alice.pem"...
|
2020-03-15 10:11:43 -04:00
|
|
|
Enter passphrase for new signer key with ID f8097df:
|
|
|
|
Repeat passphrase for new signer key with ID f8097df:
|
2017-09-26 14:46:38 -04:00
|
|
|
Successfully imported key from alice.pem
|
|
|
|
```
|
2020-03-15 10:11:43 -04:00
|
|
|
|
|
|
|
To specify a name use the `--name` flag:
|
2017-09-26 14:46:38 -04:00
|
|
|
|
2021-08-21 08:54:14 -04:00
|
|
|
```console
|
2017-10-09 13:44:52 -04:00
|
|
|
$ docker trust key load --name alice-key alice.pem
|
2017-09-26 14:46:38 -04:00
|
|
|
|
|
|
|
Loading key from "alice.pem"...
|
2020-03-15 10:11:43 -04:00
|
|
|
Enter passphrase for new alice-key key with ID f8097df:
|
|
|
|
Repeat passphrase for new alice-key key with ID f8097df:
|
2017-09-26 14:46:38 -04:00
|
|
|
Successfully imported key from alice.pem
|
|
|
|
```
|