Docker Community Forums

Share and learn in the Docker community.

How to change passphrase for docker content trust repository?

Issue type
docker version: 19.03.12

I created a strong passphrase with special characters for export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE="PASSPHRASEwithspecialcharacters@#*$".
This is bad, because setting it in the environment variable throws the error that it failed to decrypt the imported key for the repository. Instead using the passphrase with the special characters in the normal bash input successfully imports.

So my question would be, what are my options? I want to use the passphrase via environment variable to automate my process.

Steps to reproduce:

  1. Follow
  2. Create passphrase with any special character @#*$_-!

Edit: figured it out: single quotes for the environment variable works. :man_facepalming: