Kingamere
Kingamere

Reputation: 10146

Docker log in command does not work

I have installed boot2docker on on my windows machine and have created a repository on docker hub. I am trying to log in with the following command in the linux shell:

docker login --username=myusername --password=mypassword [email protected]

But I am getting this in the shell:

enter image description here

The password field appears asking me to enter my password, but when I do and press enter, nothing happens.

Ideas?

Upvotes: 3

Views: 1507

Answers (3)

VonC
VonC

Reputation: 1326932

Update February 2016

PR 19891 "Enable cross-platforms login to Registry" is supposed to fixed the issue

Use a daemon-defined Registry URL for docker login.

This allows a Windows client interacting with a Linux daemon to properly use the default Registry endpoint instead of the Windows specific one.

It is in commit 19eaa71 (maybe for docker 1.10?)


tyagian reports the following solution in issue 18019:

Open the config json file: C:\Users\Username\.docker\config.json

It will look like this:

{
  "auths": {
    "https://index.docker.io/v1/": {
      "auth": "<hash value>",
      "email": "<email-address>"
    }
  }
}

Change it to:

{
  "auths": {
    "https://index.docker.io/v1/": {
      "auth": "<hash value>",
      "email": "<email-d>"
    },
    "https://registry-win-tp3.docker.io/v1/": {
      "auth": "<hash value>",
      "email": "<email-address>"
    }
  }
}

and then try again:

$ docker push username/image-name

Upvotes: 2

Elijah W. Gagne
Elijah W. Gagne

Reputation: 2841

It looks like this is a known issue:

The second link provides a workaround, but it's not working for me.

Upvotes: 0

Felix Ribeiro
Felix Ribeiro

Reputation: 114

Check if the file config.json exists. Usually this file is under ~/.docker/ directory.

try:

cat ~/.docker/config.json

Upvotes: 0

Related Questions