Error response from daemon: Get https://ghcr.io/v2/: denied #26832
-
Hi there, I’m trying to docker login to GHCR and I encounter this error. Here is my workflow run. Can someone help me here? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
The login command as such looks correct. Can you check that your You can also use a command like the following from your local (I’m emphasizing local because a base64 encoded version of your token will be part of the output) machine to check if the token works. Replace
If you can authenticate with the token you’ll get a |
Beta Was this translation helpful? Give feedback.
-
Hi, I am able to successfully login using the CR_PAT generated locally on my machine. However, I run into this issue when initiated from the GitHub action workflow. |
Beta Was this translation helpful? Give feedback.
-
I’m not sure what’s wrong here if the CR_PAT works locally it should work this way. Here are some ideas to try: Reorder the command, docker login takes the server as the final argument but on linux it usually works fine. You could also use
Try using the login-action which simplifies all of this.
|
Beta Was this translation helpful? Give feedback.
-
works like a charm, thanks a lot. |
Beta Was this translation helpful? Give feedback.
I’m not sure what’s wrong here if the CR_PAT works locally it should work this way. Here are some ideas to try:
Reorder the command, docker login takes the server as the final argument but on linux it usually works fine. You could also use
${{ github.repository_owner }}
instead of your username but again this doesn’t usually cause errors.echo ${{ secrets.CR_PAT }} | docker login -u ${{ github.repository_owner }} --password-stdin ghcr.io
Try using the login-action which simplifies all of this.