Search code examples
sql-serverdockerdocker-commanddocker-pull

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


I am going through a unexpected error. I am always getting the error "Error response from daemon: unauthorized: authentication required" whenever I am trying to pull microsoft/mssql-server-windows:2017-latest by using the blow command.

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

Surprisingly I am able to login when I use docker login, I am not sure what I am missing here. I am also able to login to https://hub.docker.com/ with the credentials I have. The problem exists only when I try pull.

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>


Solution

  • I found out the reason. It was the problem with the repository name. I searched for mmsql in the 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 and run the pull command as below.

    docker pull microsoft/mssql-server-windows-express

    After I enter my credentials it was pulling the repository as expected. It seems like we get this authorize error when the repository name is invalid.

    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