Docker push error not authenticated

Hi all,
I have a problem with docker push. First, I had some error:

$ docker push [....:latest)
The push refers to repository [[.....)]
bdab314e3180: Preparing
ff121d623e83: Preparing
d75592028165: Preparing
04a4d72a31a2: Preparing
e5a971def1ce: Preparing
cc2447e1835a: Waiting
denied: Unauthenticated request. Unauthenticated requests do not have permission "artifactregistry.repositories.uploadArtifacts" on resource "...." (or it may not exist)

After I did reinstall to docker now the error is:

$ DOCKER_TRACE=1 docker push [....:latest)
The push refers to repository [[...l](http://...]
96526aa774ef: Waiting
270d71bebc90: Waiting
1bd926303f68: Waiting
da3412c5b473: Waiting
05c6beae0200: Waiting
1822f87386e0: Waiting
307fa82c7a28: Waiting
failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://..: 403 Forbidden

It indicates something that maybe I am not authenticated or don’t have permissions but I do the login and when entering command to check if logged, then it says that the user is active. Also I have permission: owner.

I really can’t understand what happens because I was able to run this command, but after someone adding some alias command to be available for everyone then docker push is not okay. I don’t know if it is connected with that or not.

Thank you very much.

Usually you need to run docker login to authenticate against a registry.

yes, I am already logged in

AFAIK docker login will create a file with the credentials for the user. Maybe that file is not accessible for “everyone”.

What was that alias command for? what registry are you using where you want to push images? Have you named the image correctly? Where are you using the Docker command? In what shell / terminal? I see the “windows” tag on the topic. Are you using Docker Desktop on a supported Windows version? Or maybe you are on a server? You created the topic in the “Image builds” category, but you have no problem with building an image, only pushing it. But to choose the right category, we need to know where you are running Docker and how it was installed.

There are too many unknown details.

We usually need the following information to understand the issue:

  1. What platform are you using? Windows, Linux or macOS? Which version of the operating systems? In case of Linux, which distribution?

  2. How did you install Docker? Sharing the platform almost answers it, but only almost. Direct links to the followed guide can be useful.

  3. On debian based Linux, the following commands can give us some idea and recognize incorrectly installed Docker:

    docker info
    docker version
    

    Review the output before sharing and remove confidential data if any appears (public IP for example)

    dpkg -l 'docker*' | grep '^ii'
    snap list docker
    

    When you share the outputs, always format your posts according to the following guide: How to format your forum posts

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.