Skip to content

docker trust key load fails without error on invalid file. #2031

Closed as not planned

Description

@gsexton

Description
Using the command docker trust key load will fail but indicate "Successfully imported key from ..."

Steps to reproduce the issue:

  1. Create a delegation key using the command: docker trust key generate key-name
  2. Copy the newly generated private key file from ~/.docker/trust/private to a new user account or new machine.
  3. Execute the command: "docker trust key load --name jeff --name new-key-id.key

Describe the results you received:
The program prompted:

Enter passphrase for encrypted key:
Successfully imported key from new-key-id.key

Inspection of the ~/.docker/trust/private directory shows the key was NOT imported.

Describe the results you expected:

If the key could not be imported, a useful error message should be displayed. Something like:
"Key key-name could not be imported. Was this key created using notary key export?"

Additional information you deem important (e.g. issue happens only occasionally):

The correct sequence of events is to EXPORT the key using the notary key export command. This adds the additional field "path" to the exported key file, which is evidently required.

notary key export --key key-id -o key-name.pem

Output of docker version:

Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc7715621
 Built:             Fri Jun  7 12:00:00 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Output of docker info:

N/A

Additional environment details (AWS, VirtualBox, physical, etc.):
OpenSUSE Leap 15.1

Activity

  1. thaJeztah commented on Apr 22, 2025

    @thaJeztah
    Member

    closing as this went stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions