[SOLVED] Cannot push docker image

Hello,

I pulled a docker image from dockerhub, modify it and now I want to push it in a different repository so that I can use it. I cannot push to the same repository because I didn’t create this image.

I tried to push it using

docker tag e6774ef543e0 < username >/< img-repository >
docker push < username >/< img-repository >

The image repository is something like: example/example-img

And I get the error:
denied: requested access to the resource is denied

I found the problem is the image repository example/example-img I changed it to example and now it all works fine