Pushing to Docker Hub: access denied

Hi all,

I tried to push my image ti Docker Hub, but all I get ist “denied: requested access dto resource is denied”
My search turned up, that I need a repository first, so prepared one, and that I need to name the image appropriately. So now I got:

But I still get the same error message with both images.

What do I need to change, so it works?

As I was not allowed to enter my other screenshot in the post, I am adding it in an answer. This is the repository:
grafik

A version tag and the repository name must be separated by a colon, not a slash.

Does that mean, I have to add a version tag? What you see right now is just my username, the repository and the image name. I have omitted the version tag, as i thought that was optional.

I exchanged the last slah for a colon and it worked. I’m still puzzled for the definitions of tag and name, or is there no name(?), but it worked.

Understandable. Hopefully it will be clearer in the future. You can read about it here:

So basically you have a “Repository” and the “tag”, but the docker tag command can replace the entire name of the image including the repository and the tag. And the documentation refers to the repository as source image and target image. On the other hand, when you create a repository on Docker Hub, you cannot set the whole name, only the part after the owner. That is also understandable, but it doesn’t make it less confusing :slight_smile:

Run this command:for example:

docker pull registry.access.redhat.com/ubi8/pause:latest

This image is not from Docker Hub, so there is a registry domain. You can inspect the image

docker image inspect registry.access.redhat.com/ubi8/pause:latest --format '{{ json .RepoTags }}'

And you will can a json list which contains all the full image names

["registry.access.redhat.com/ubi8/pause:latest"]

Then run this to list the images fitlering to the one above

docker image list registry.access.redhat.com/ubi8/pause:latest --format '{{ json . }}'

And you will get the Repository and the Tag in separate fields

{
  "Containers": "N/A",
  "CreatedAt": "2024-06-27 19:41:25 +0200 CEST",
  "CreatedSince": "3 weeks ago",
  "Digest": "<none>",
  "ID": "6553951de955",
  "Repository": "registry.access.redhat.com/ubi8/pause",
  "SharedSize": "N/A",
  "Size": "28.5MB",
  "Tag": "latest",
  "UniqueSize": "N/A",
  "VirtualSize": "28.51MB"
}

And you can filter the image by full name, but you have to use the “reference” keyword, not “name”, not “repository” and not “tag”.

docker image list  --filter reference="registry.access.redhat.com/ubi8/pause"
REPOSITORY                              TAG       IMAGE ID       CREATED       SIZE
registry.access.redhat.com/ubi8/pause   latest    6553951de955   3 weeks ago   28.5MB

This “reference” can also contain the tag optionally, but as you can see, the two main parts are indeed “Repository” and “tag”.