I have Ubuntu 20.04 and I have tried using docker login
to log in in terminal, but got:
docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: sfelshtyn
Password:
Error saving credentials: error storing credentials - err: exit status 1, out: `error getting credentials - err: exit status 1, out:` no usernames for https://index.docker.io/v1/``
9
Answers
I read Error saving credentials: error storing credentials - err: exit status 1, out: pass store is uninitialized to solve my problem, but none of them helped.
Then I switched to official docker documentation and found that I didn't go through the credentials management process during docker installation.
I did a few steps:
gpg --generate-key
pass init <generated gpg-id public key>
docker pull molly/privateimage
After that I tried again docker login. I passed my personal data and it worked for me. I solved my issue.
When you run the gpg command. Then while running the pass init command, pass the pub key generated on the the output of gpg command.
$ pass init <pub key from gpg command>
This worked for me –
I changed the value of "credsStore" to "wincred" in config.json and I was able to login with my windows credential
Try to execute following command
then try docker login it will ask for username and password
The following helped me:
rm -rf ~/.password-store/docker-credential-helpers
gpg --generate-key
pass init <generated gpg-id public key>
It’s worked for me
Basically, you need to remove your credentials from your local environment,(These two rm ~ commands do this work)
If you are having permission issues, use sudo
After trying all of the above method, the issue still persists, use your
email id
to login rather than yourusername
I fixed it as below for windows machine,
Go to your
C://Users/YOUR_USER_FOLDER
Get inside
.docker
folderRemove
config.json
fileTry login again and it succeeded.