Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

docker pull says access denied or repository does not exist

Errorpull 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.

  • Applies to Docker Engine 28, Docker Hub
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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>
  2. 2Match what you see, then jump to its fix

    1. 1The name in the error is not what you meant to pullThe image name is wrong or has no registry hostFix
    2. 2The name is right and the message says 'may require docker login'The image is private and you are not logged inFix
    3. 3Login succeeds, the pull still fails for a private repoLogged in, but the account has no access to that repositoryFix

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.yml

2Fix

Correct the spelling, or add the registry host and namespace to the reference.

docker pull registry.example.com/team/my-app:2.0

3Verify

The pull completes.

docker pull registry.example.com/team/my-app:2.0

Confirmed by docs.docker.com

Did this fix it?

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.json

2Fix

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-stdin

3Verify

The same pull now works.

docker pull <image>:<tag>

Confirmed by docs.docker.com

Did this fix it?

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 login

2Fix

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

Did this fix it?

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

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.