github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/docs/reference/commandline/trust_key_load.md (about)

     1  ---
     2  title: "key load"
     3  description: "The key load command description and usage"
     4  keywords: "key, notary, trust"
     5  ---
     6  
     7  <!-- This file is maintained within the docker/cli Github
     8       repository at https://github.com/docker/cli/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # trust key load
    17  
    18  ```markdown
    19  Usage:	docker trust key load [OPTIONS] KEYFILE
    20  
    21  Load a private key file for signing
    22  
    23  Options:
    24        --help          Print usage
    25        --name string   Name for the loaded key (default "signer")
    26  ```
    27  
    28  ## Description
    29  
    30  `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`.
    31  
    32  ## Examples
    33  
    34  ### Load a single private key
    35  
    36  For a private key `alice.pem` with permissions `-rw-------`
    37  
    38  ```bash
    39  $ docker trust key load alice.pem
    40  
    41  Loading key from "alice.pem"...
    42  Enter passphrase for new signer key with ID f8097df: 
    43  Repeat passphrase for new signer key with ID f8097df: 
    44  Successfully imported key from alice.pem
    45  
    46  ```
    47  to specify a name use the `--name` flag
    48  
    49  ```bash
    50  $ docker trust key load --name alice-key alice.pem
    51  
    52  Loading key from "alice.pem"...
    53  Enter passphrase for new alice-key key with ID f8097df: 
    54  Repeat passphrase for new alice-key key with ID f8097df: 
    55  Successfully imported key from alice.pem
    56  
    57  ```