[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


The same thing happend to me. A 2GB image got all the way to the end and then showed “unathorized: authentication required”. I pushed a smaller image no problem. Any suggestions?

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

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.

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