我已经在我的 Windows 机器上安装了 boot2docker,并在 docker hub 上创建了一个存储库。我尝试在 linux shell 中使用以下命令登录:
docker login --username=myusername --password=mypassword --email=myemail@gmail.com
但是我在 shell 中得到了这个:
出现密码字段,要求我输入密码,但是当我输入密码并按 Enter 键时,没有任何反应。
想法?
最佳答案
2016 年 2 月更新
PR 19891 "Enable cross-platforms login to Registry"应该可以解决这个问题
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.
位于 commit 19eaa71 (也许适用于 docker 1.10?)
<小时/>tyagian报告following solution在 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>"
}
}
}
将其更改为:
{
"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
关于Docker 登录命令不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31863637/