June
June

Reputation: 543

Docker push "denied: requested access to the resource is denied"

I'm on Ubuntu Linux Server 20.04 and this is my first time pushing something to Docker so I just created a dummy container locally and it worked. Following some tutorials online, the hello-world example also works just fine.

Here's what I've tried:

  1. I create a repo online

    • I've tried all of this for both public and private repos.
    • I just have a stardard account, this is not an organization.
  2. docker login (Which succeeds)

    • I've also tried docker login -u <username>
    • I've tried with and without the pass program (Both succeed in logging in)
    • To make sure it's not reporting a false"success" message I tried using an incorrect password and it failed accordingly so the login appears to work.
  3. docker tag <local repo name>:latest <username>/<online repo name>:v1

    • I've tried a myriad of other ways such as the following but they all produce the same error
    • docker tag <local repo name>:latest <username>/<repo name>:latest
    • docker tag <local repo name> <username>/<repo name>:latest
    • docker tag <local repo name>:latest <username>/<repo name>:v1
    • docker tag <local repo name> <username>/<repo name>:v1
    • docker tag <local repo name>:latest <username>/<repo name>
    • docker tag <local repo name> <username>/<repo name>
  4. docker push <username>/<online repo name>:v1

    • I've also tried docker push <username>/<online repo name>
  5. This is the output

The push refers to repository [docker.io/<username>/<online repo name>]
3c8373fcfed2: Preparing
dc881c014b38: Preparing
933337b6e971: Preparing
10e1cb1c03c2: Preparing
770786057cc0: Preparing
570175f149e2: Waiting
3e207b409db3: Waiting
denied: requested access to the resource is denied

At this point I've just given up, I don't understand why it's being denied and not pushing but I've gone through 2 Google pages of links trying to research this spanning 2 days so I don't know what else to do.

Upvotes: 3

Views: 1098

Answers (1)

June
June

Reputation: 543

In attempt to not store my docker password unencrypted I'm using the recommended pass program on the Docker website. If I give up and just allow my password to be unencrypted it works. This is an issue with pass or Docker's communication with pass. I'm not happy about having to have my password unencrypted but it's either that or I can't push to Docker Hub.

There are 4 solutions for not storing your password unencrypted and the only one for Linux servers is pass.

Upvotes: 3

Related Questions