docker pull 命令不允许使用密码,并且总是从守护进程收到错误响应:未经授权:需要身份验证

docker pull command doesn't allow password and always getting Error response from daemon: unauthorized: authentication required

我遇到了意外错误。每当我尝试使用 blow 命令拉取 microsoft/mssql-server-windows:2017-latest 时,我总是收到错误 "Error response from daemon: unauthorized: authentication required"。

C:\Users\Administrator>docker pull microsoft/mssql-server-windows:2017-latest

令人惊讶的是,当我使用 docker login 时我能够登录,我不确定我在这里缺少什么。我还可以使用我拥有的凭据登录 https://hub.docker.com/。仅当我尝试拉动时才存在问题。

C:\Users\Administrator>docker pull microsoft/mssql-server-windows:2017-latest

Please login prior to pull: 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: sibeeshvenu Password: Error response from daemon: unauthorized: authentication required

C:\Users\Administrator>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: sibeeshvenu Password: Login Succeeded

C:\Users\Administrator>docker pull microsoft/mssql-server-windows:2017-latest

Please login prior to pull: 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 (sibeeshvenu): sibeeshvenu Password: Error response from daemon: unauthorized: authentication required

C:\Users\Administrator>

我找到原因了。这是存储库名称的问题。我在 hub.docker, there I could not find any repositories with the name microsoft/mssql-server-windows:2017-latest and I selected mssql-server-windows-express 和 运行 中搜索了 mmsql,如下所示。

docker pull microsoft/mssql-server-windows-express

在我输入凭据后,它正在按预期提取存储库。当存储库名称无效时,我们似乎会收到此授权错误。

C:\Users\Administrator>docker pull microsoft/mssql-server-windows-express Using default tag: latest latest: Pulling from microsoft/mssql-server-windows-express 3889bb8d808b: Extracting [======================================>
] 3.127 GB/4.07 GB 449343c9d7e2: Download complete a336350523ea: Download complete 2c12ef99f411: Download complete 8ebb28bb3276: Download complete 3bb8431b46ce: Download complete a4a938096b3c: Download complete 656eb837f7e6: Download complete a3d536b0e79d: Download complete a0aec5f46615: Download complete 64a0f6512541: Download complete b900d04a68bd: Download complete