Docker Pull Error Response From Authentication Required | How to Fix

This error indicates that you’re trying to pull a Docker image from a private repository without being authenticated. The Docker daemon is being denied access because it doesn’t have the necessary credentials (username and password or an authentication token) to download the image.

The error message:

Error response from daemon: pull access denied for [image], repository does not exist or may require 'docker login'
or
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: authentication required

means that Docker cannot pull the image because:


๐Ÿงญ Common Causes

Cause Explanation
๐Ÿ”’ Private Image You’re trying to pull an image from a private repo on Docker Hub or another registry, and you’re not authenticated.
โŒ Typo in Image Name The image name is incorrect or doesnโ€™t exist (e.g., myimage instead of username/myimage).
๐Ÿ” Not Logged In You’re trying to access a private registry (Docker Hub, GitHub Packages, AWS ECR, etc.) without running docker login.
๐ŸŒ Network Issues Docker can’t reach the registry due to firewalls or connectivity problems.
๐Ÿ—‚๏ธ Missing Tag You’re trying to pull imagename instead of imagename:latest (and latest doesn’t exist).
๐Ÿงพ Rate Limiting Docker Hub applies pull rate limits for anonymous users. If exceeded, it may fail.

โœ… How to Fix It

โœ… 1. Check Image Name

Make sure the image exists and the name is correct.

Example of correct public image:

docker pull nginx
docker pull ubuntu:20.04

Example of correct private image:

docker pull username/private-image

If you’re using a custom registry:

docker pull myregistry.com/myuser/myimage:tag

Also Read : Dockerhub Down Fixed : Error Response from Login Attempt to Failed With 401 Unauthorized


โœ… 2. Login to Docker Registry

For Docker Hub:

docker login

For other registries:

docker login <registry-url>

You’ll be prompted for your username and password/token. For Docker Hub, you may need a personal access token instead of a password if 2FA is enabled.


โœ… 3. Check Repository Privacy

If it’s your own image on Docker Hub:

  • Go to hub.docker.com

  • Log in > Navigate to your repository

  • Ensure it’s set to Public if you want to allow anonymous pulls.


โœ… 4. Tag and Push Correctly (if creating image)

If you’re trying to pull an image you created locally, make sure you pushed it:

docker tag myimage username/myimage
docker push username/myimage

Then you can pull it like:

docker pull username/myimage

โœ… 5. Use Fully Qualified Image Paths

If using a non-Docker Hub registry:

docker pull ghcr.io/username/image:tag
docker pull registry.gitlab.com/username/image:tag

โœ… 6. Check for Rate Limits

If you’re using Docker without login (anonymous):

  • You’re limited to 100 pulls per 6 hours per IP.

  • Login to increase limits (200 pulls per 6h with a free account).


โœ… 7. Inspect and Debug

To get more info, try:

docker pull --debug your/image

You can also try running:

docker logout
docker login
docker pull your/image

๐Ÿงฉ Example Fix

Problem:

docker pull myimage
# Error: authentication required

Fix:

docker login
docker pull myusername/myimage
Even after logging in, you might not have the correct permissions to pull a specific image. Contact the administrator of the repository to confirm that your account has the necessary read access to the image.