Compose "pull access denied ... repository does not exist or may require docker login" in CI
Compose pulled the image referenced by a service and the registry refused anonymous access. Either the repository is private and no login was configured, or the image name is wrong so it appears not to exist.
What this error means
A docker compose up or pull fails with "pull access denied for <image>, repository does not exist or may require 'docker login': denied: requested access to the resource is denied".
Error response from daemon: pull access denied for acme/private-api,
repository does not exist or may require 'docker login':
denied: requested access to the resource is deniedCommon causes
No login for a private image
The service image is in a private repository and the runner never authenticated, so the registry returns access denied.
A misspelled or unqualified image name
A typo or a missing registry prefix makes the daemon look for a repository that does not exist.
How to fix it
Log in before pulling
- Authenticate to the registry the image lives in.
- Confirm the image reference is correct and fully qualified.
- Re-run
docker compose pull.
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}Fix the image reference in the compose file
Use the full registry/owner/image:tag so the daemon resolves the right repository.
services:
api:
image: ghcr.io/acme/private-api:1.4.0How to prevent it
- Authenticate to private registries before compose pulls.
- Use fully qualified image references in compose files.
- Grant the CI token pull access to the repository.