skip to Main Content

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


  1. Chosen as BEST ANSWER

    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:

    1. gpg --generate-key
    2. pass init <generated gpg-id public key>
    3. 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.


  2. 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>

    Login or Signup to reply.
  3. This worked for me –

    pass remove -rf docker-credential-helpers
    
    Login or Signup to reply.
  4. I changed the value of "credsStore" to "wincred" in config.json and I was able to login with my windows credential

    Login or Signup to reply.
  5. Try to execute following command

    service docker stop
    rm ~/.docker/config.json
    service docker start
    

    then try docker login it will ask for username and password

    Login or Signup to reply.
  6. The following helped me:

    1. rm -rf ~/.password-store/docker-credential-helpers
    2. gpg --generate-key
    3. pass init <generated gpg-id public key>
    Login or Signup to reply.
  7. It’s worked for me

    service docker stop
    rm ~/.docker/config.json
    rm /usr/local/bin/docker-credential-pass
    service docker start
    

    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

    Login or Signup to reply.
  8. After trying all of the above method, the issue still persists, use your email id to login rather than your username

    Login or Signup to reply.
  9. I fixed it as below for windows machine,

    1. Go to your C://Users/YOUR_USER_FOLDER

    2. Get inside .docker folder

    3. Remove config.json file

    4. Try login again and it succeeded.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search