Question

[Error] Push image to container registry: authentication required

First: push 2 image size: 17.2MB vs 23.5 MB, success. Then, I push a image with size 2.37 GB

061c76d11c20: Pushing [==================================================>]  2.268GB
244f992db81c: Layer already exists
40149c0b59b9: Layer already exists
6a71212e7be2: Layer already exists
7b5f4a643c16: Layer already exists
99b5261d397c: Layer already exists
unauthorized: authentication required

So, how I can push it in to container registry. Thanks for any support

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there @hungnn,

I could suggest following these steps here:

  • Make sure that your image tag and name is correct matching your Docker hub repository name:
docker images
  • If this is not the case tag your image accordingly:
docker tag IMAGE_ID YOUR_TAG

For example:

docker tag 5bbpg22ssd34 bobbyiliev/php-image:latest
  • Then login to Docker Hub:
docker login
  • Then finally push the image:
docker push bobbyiliev/php-image:latest

For more information you could take a look at the following tutorial:

How to push images to Docker Hub

Let me know how it goes! Regards, Bobby