All thanks and credits to Ayrat-Kh, see also the original thread:
- Download "docker-credential-pass"
wget https://github.com/docker/docker-credential-helpers/releases/download/v0.8.2/docker-credential-pass-v0.8.2-amd64
-
Copy file to
/usr/bin
directory. -
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>
. -
Install gpg2 and pass.
apt install gpg2 pass
-
gpg2 --generate-key
. Enter your name, mail, etc. You will get gpg-id like "5BB54DF1XXXXXXXXF87XXXXXXXXXXXXXX945A". Copy it to clipboard. -
pass init (paste from clipboard)
-
pass insert docker-credential-helpers/docker-pass-initialized-check
and set the next passwordpass is initialized
(without quotes). -
pass show docker-credential-helpers/docker-pass-initialized-check
. You should seepass is initialized.
-
docker-credential-pass list
. You should see {} or another data. You shouldn`t see error like "pass store is uninitialized". -
nano ~/.docker/config.json
. Paste into the following:{ "credsStore": "pass" }
and save. -
docker login
as usual.