Search code examples
dockerboot2dockerdockerfiledockerhubdocker-registry

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=myemail@gmail.com

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?


Solution

  • 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