github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/docs/reference/commandline/trust_key_load.md (about)

     1  # trust key load
     2  
     3  <!---MARKER_GEN_START-->
     4  Load a private key file for signing
     5  
     6  ### Options
     7  
     8  | Name     | Type     | Default  | Description             |
     9  |:---------|:---------|:---------|:------------------------|
    10  | `--name` | `string` | `signer` | Name for the loaded key |
    11  
    12  
    13  <!---MARKER_GEN_END-->
    14  
    15  ## Description
    16  
    17  `docker trust key load` adds private keys to the local Docker trust keystore.
    18  
    19  To add a signer to a repository use `docker trust signer add`.
    20  
    21  ## Examples
    22  
    23  ### Load a single private key
    24  
    25  For a private key `alice.pem` with permissions `-rw-------`
    26  
    27  ```console
    28  $ docker trust key load alice.pem
    29  
    30  Loading key from "alice.pem"...
    31  Enter passphrase for new signer key with ID f8097df:
    32  Repeat passphrase for new signer key with ID f8097df:
    33  Successfully imported key from alice.pem
    34  ```
    35  
    36  To specify a name use the `--name` flag:
    37  
    38  ```console
    39  $ docker trust key load --name alice-key alice.pem
    40  
    41  Loading key from "alice.pem"...
    42  Enter passphrase for new alice-key key with ID f8097df:
    43  Repeat passphrase for new alice-key key with ID f8097df:
    44  Successfully imported key from alice.pem
    45  ```