Docker Push Error: denied: requested access to the resource is denied
TLDR
If you see denied: requested access to the resource is denied when pushing a Docker image, check your authentication, repository name, and permissions. Log in with docker login and make sure your image is tagged for the correct registry.
Pushing Docker images to a registry is a key part of most CI/CD workflows. Sometimes, you hit a frustrating error: denied: requested access to the resource is denied. This usually means there's a problem with authentication, repository naming, or permissions.
Why Does This Error Happen?
- Not Logged In: You haven't authenticated with the registry.
- Wrong Repository Name: The image isn't tagged for the right registry or namespace.
- Insufficient Permissions: Your user doesn't have push access.
Step 1: Check Your Image Tag
Your image must be tagged with the full registry path. For Docker Hub, this usually means username/repo:tag.
# Tag your image for Docker Hub
docker tag my-app:latest username/my-app:latest
For private registries, include the registry URL:
docker tag my-app:latest registry.example.com/my-app:latest
Step 2: Log In to the Registry
Authenticate with the registry using:
docker login
You'll be prompted for your username and password (or token).
Step 3: Push the Image
Now push the image:
docker push username/my-app:latest
If you still get the error, double-check your permissions on the registry. For Docker Hub, make sure the repository exists and your user has write access.
Troubleshooting Tips
- Double-check the image tag and registry path.
- Make sure you're logged in to the correct registry.
- Check your user permissions on the registry.
- For private registries, verify SSL certificates and network access.
By following these steps, you can resolve most Docker push errors and keep your CI/CD pipeline running smoothly.
Good luck with your project!
Related Resources
- Push Docker Image to Private Repo — private registry workflow
- Docker Rename Image Repository — fix image naming
- Copy Docker Images Between Hosts — transfer without a registry
- Introduction to Docker: Working with Images — image management guide
We earn commissions when you shop through the links below.
DigitalOcean
Cloud infrastructure for developers
Simple, reliable cloud computing designed for developers
DevDojo
Developer community & tools
Join a community of developers sharing knowledge and tools
SMTPfast
Developer-first email API
Send transactional and marketing email through a clean REST API. Detailed logs, webhooks, and embeddable signup forms in one dashboard.
QuizAPI
Developer-first quiz platform
Build, generate, and embed quizzes with a powerful REST API. AI-powered question generation and live multiplayer.
Want to support DevOps Daily and reach thousands of developers?
Become a SponsorFound an issue?
Related Posts
Also worth your time on this topic
5 Advanced Docker Features Worth Knowing
Go beyond Docker basics with BuildKit, multi-stage builds, health checks, init processes, and build secrets. Learn practical techniques that improve security, performance, and reliability.
Docker Multi-Stage Build Optimization
Learn to create efficient Docker images using multi-stage builds to reduce image size and improve security.
60 minutes
CI/CD Pipeline Setup Checklist
Step-by-step checklist for a production-ready CI/CD pipeline: source control, builds, tests, security scans, deploy gates, secrets, and rollback paths.
1-2 hours