2017-09-26 14:46:38 -04:00
|
|
|
---
|
2017-10-09 13:44:52 -04:00
|
|
|
title: "key load"
|
|
|
|
description: "The key load command description and usage"
|
2018-03-13 18:26:39 -04:00
|
|
|
keywords: "key, notary, trust"
|
2017-09-26 14:46:38 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
<!-- This file is maintained within the docker/cli Github
|
|
|
|
repository at https://github.com/docker/cli/. Make all
|
|
|
|
pull requests against that repo. If you see this file in
|
|
|
|
another repository, consider it read-only there, as it will
|
|
|
|
periodically be overwritten by the definitive file. Pull
|
|
|
|
requests which include edits to this file in other repositories
|
|
|
|
will be rejected.
|
|
|
|
-->
|
|
|
|
|
2017-10-09 13:44:52 -04:00
|
|
|
# trust key load
|
2017-09-26 14:46:38 -04:00
|
|
|
|
|
|
|
```markdown
|
2017-10-25 13:45:10 -04:00
|
|
|
Usage: docker trust key load [OPTIONS] KEYFILE
|
2017-09-26 14:46:38 -04:00
|
|
|
|
2017-10-25 13:45:10 -04:00
|
|
|
Load a private key file for signing
|
2017-09-26 14:46:38 -04:00
|
|
|
|
2017-10-25 13:45:10 -04:00
|
|
|
Options:
|
|
|
|
--help Print usage
|
|
|
|
--name string Name for the loaded key (default "signer")
|
2017-09-26 14:46:38 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
2017-10-09 13:44:52 -04:00
|
|
|
`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`.
|
2017-09-26 14:46:38 -04:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
### Load a single private key
|
|
|
|
|
|
|
|
For a private key `alice.pem` with permissions `-rw-------`
|
|
|
|
|
|
|
|
```bash
|
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"...
|
|
|
|
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
|
|
|
|
|
|
|
|
```bash
|
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"...
|
|
|
|
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
|
|
|
|
|
|
|
|
```
|