docker pull says access denied or repository does not exist
pull access denied for <image>, repository does not exist or may require 'docker login'Short answer
Docker prints this when it cannot find the image under that name with your current credentials. Check the spelling and the registry host in the image name first. If the name is right and the image is private, run docker login with an account that has pull permission.
Fix it fast
1Find out which cause you have
Try the pull on its own with the full name, so compose and build do not hide the real argument.
docker pull <image>:<tag>2Match what you see, then jump to its fix
- 1
The name in the error is not what you meant to pullThe image name is wrong or has no registry hostFix - 2
The name is right and the message says 'may require docker login'The image is private and you are not logged inFix - 3
Login succeeds, the pull still fails for a private repoLogged in, but the account has no access to that repositoryFix
- 1
What does the error look like?
pull access denied for <image>, repository does not exist or may require 'docker login'Error response from daemon: pull access denied for <image>
Cause 1 of 3
The image name is wrong or has no registry host
1Check
A bare name such as alpine means docker.io/library/alpine. A name with a namespace but no host is read as Docker Hub too. An image on another registry needs its host in front.
docker image ls
grep -rn "image:\|^FROM" Dockerfile docker-compose.yml2Fix
Correct the spelling, or add the registry host and namespace to the reference.
docker pull registry.example.com/team/my-app:2.03Verify
The pull completes.
docker pull registry.example.com/team/my-app:2.0Confirmed by docs.docker.com
Cause 2 of 3
The image is private and you are not logged in
1Check
A private repository is only visible to accounts that were granted access, so an anonymous pull can get the error text 'repository does not exist or may require docker login'.
cat ~/.docker/config.json2Fix
Log in to the registry that holds the image, with a personal access token if the account uses one. Use the token on stdin so it stays out of shell history.
docker login
# private registry
cat token.txt | docker login registry.example.com --username myuser --password-stdin3Verify
The same pull now works.
docker pull <image>:<tag>Confirmed by docs.docker.com
Cause 3 of 3
Logged in, but the account has no access to that repository
1Check
Personal repos grant access through collaborators; organization repos through roles and teams.
docker logout && docker login2Fix
Ask the repository owner to add the account as a collaborator or to the right team, or log in with the account that already has access.
docker login -u <account-with-access>3Verify
Pull again with that account.
docker pull <image>:<tag>Confirmed by docs.docker.com
How do I stop it coming back?
- Copy image names from the registry page, not from memory.
- In CI, log in before the pull step with a token stored as a secret, never your password.
- Pin tags in compose files so a deleted or renamed tag shows up in review.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Servers
docker push is denied: requested access to the resource is denied
push access denied, repository does not exist or may require authorization
The registry refused the push.
3 causes, each with a fixServers
docker pull cannot download images behind a corporate proxy
curl through the proxy works in your shell, while docker pull fails
docker pull is done by the daemon, not by your shell, so exporting HTTP_PROXY in the terminal changes nothing.
3 causes, each with a fixServers
apk cannot find py-pip in an Alpine Docker image
py-pip (no such package):
On current Alpine releases there is no package called py-pip.
2 causes, each with a fixServers
ng serve runs in the container but localhost:4200 does not open
The browser cannot open localhost:4200 although ng serve is running in the container
ng serve listens on localhost by default, which inside a container is the container itself.
3 causes, each with a fixServers
Angular routes return 404 from nginx when you refresh or open a link
The home page loads, but refreshing /some/route shows an nginx 404
Angular routes like /users/42 are not files, so nginx looks for them on disk and returns 404.
3 causes, each with a fixServers
AH00558: Apache in Docker cannot reliably determine its fully qualified domain name
Set the 'ServerName' directive globally to suppress this message
AH00558 is a warning, not a crash.
2 causes, each with a fix