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'
orError 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:
Example of correct private image:
If you’re using a custom registry:
Also Read : Dockerhub Down Fixed : Error Response from Login Attempt to Failed With 401 Unauthorized
β 2. Login to Docker Registry
For Docker Hub:
For other registries:
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:
Then you can pull it like:
β 5. Use Fully Qualified Image Paths
If using a non-Docker Hub registry:
β 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:
You can also try running:
π§© Example Fix
Problem:
Fix:
Be the first to comment