Docker error from daemon: Get https://ghcr.io/v2/: denied: denied
Codemia Knowledge Hub ·
"Error response from daemon: Get https://ghcr.io/v2/: denied: denied" means the GitHub Container Registry (GHCR) refused Docker's request, usually when pulling an image. The most common cause is that Docker is not authenticated with GHCR, or the credentials lack permission for the image. Logging in with a GitHub personal access token that has the right package scopes typically fixes it.
Reading the error message
- Error response from daemon: The Docker daemon, the background service that manages images, containers, networks, and volumes, is reporting the error.
- Get
https://ghcr.io/v2/: The URL the daemon tried to access.ghcr.iois the GitHub Container Registry domain. - denied: denied: The request was not authorized. The repeated word just emphasizes that access was refused.
Causes of the ghcr.io denied error
- Authentication issues:
- Docker is not properly authenticated with GHCR.
- Login credentials are missing or incorrect.
- Insufficient permissions:
- The Docker user lacks permission to access private container images in GHCR.
- Permissions are usually controlled through GitHub repository settings.
- Network problems:
- Connectivity issues are blocking access to GHCR.
- Outdated Docker version:
- Older Docker versions may not support the authentication methods modern registries use.
Authenticating Docker with GHCR
You need a GitHub personal access token (PAT).
Generate a personal access token
- Go to GitHub > Profile > Settings > Developer settings > Personal access tokens.
- Generate a new token (classic) with the scopes needed for GHCR, typically
read:packagesandwrite:packages. GitHub Packages only accepts classic personal access tokens.
Log in with the token
Use your GitHub username for USERNAME. Docker prints Login Succeeded, and pulls of images you have access to then work.
Rule out network issues
- Confirm that your network can reach
ghcr.io. - Check whether firewall settings are blocking the connection.
Related reading
- Error response from daemon No build stage in current context
- Error when logging into ECR with Docker login Error saving credentials... not implemented
- Essential container in task exited
- Eureka and Kubernetes
- Error when trying to obtain a certificate The specified item could not be found in the keychain
- Example code for AWS Cognito User Pool InitiateAuth with Username and Password via HTTPS call?
- Error running basic tensorflow example
- Error Running React Native App From Terminal iOS
System design interview problems on this topic
- Design a Container Orchestration System: solution and walkthrough
- Design a Code Deployment System: solution and walkthrough
- Design GitHub Actions: solution and walkthrough
- Design a Serverless Architecture Framework: solution and walkthrough

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseSystem Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.