unauthorized: unauthenticated: User cannot be authenticated with the token provided. #50035
-
Select Topic AreaQuestion BodyHello, Following steps in https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry I created a new Personal Access Token with scopes:
Then:
All good so far, but then:
I get
I must be missing something basic, but I don't see what. Could you please help? Many thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found the issue: echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin Should be: echo $CR_PAT | sudo docker login ghcr.io -u USERNAME --password-stdin Note With the first command, With the second command |
Beta Was this translation helpful? Give feedback.
I found the issue:
in https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
Should be:
Note
sudo
in the latter command.With the first command,
${HOME}/.docker/config.json
is populated but not picked up bysudo docker push ghcr.io/c-scale-community/hello-world
With the second command
/root/.docker/config.json
is populated and correctly picked up bysudo docker push ghcr.io/c-scale-community/hello-world