Skip to content

Instantly share code, notes, and snippets.

@jackyscript
Last active June 18, 2024 09:11
Show Gist options
  • Save jackyscript/506bb8cc96e9aeba7b34dd4dac9c82bd to your computer and use it in GitHub Desktop.
Save jackyscript/506bb8cc96e9aeba7b34dd4dac9c82bd to your computer and use it in GitHub Desktop.
How to initialize docker-credentials-pass

How to initialize docker-credentials-pass

All thanks and credits to Ayrat-Kh, see also the original thread:

  1. Download "docker-credential-pass"

wget https://github.com/docker/docker-credential-helpers/releases/download/v0.8.2/docker-credential-pass-v0.8.2-amd64

  1. Copy file to /usr/bin directory.

  2. Check that docker-credential-pass work. To do this, run command docker-credential-pass. You should see: Usage: docker-credential-pass <store|get|erase|list|version>.

  3. Install gpg2 and pass. apt install gpg2 pass

  4. gpg2 --generate-key. Enter your name, mail, etc. You will get gpg-id like "5BB54DF1XXXXXXXXF87XXXXXXXXXXXXXX945A". Copy it to clipboard.

  5. pass init (paste from clipboard)

  6. pass insert docker-credential-helpers/docker-pass-initialized-check and set the next password pass is initialized (without quotes).

  7. pass show docker-credential-helpers/docker-pass-initialized-check. You should see pass is initialized.

  8. docker-credential-pass list. You should see {} or another data. You shouldn`t see error like "pass store is uninitialized".

  9. nano ~/.docker/config.json. Paste into the following: { "credsStore": "pass" } and save.

  10. docker login as usual.

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