Cannot login to ghcr.io
See original GitHub issueI’m trying to have my goreleaser upload images to ghcr.io. To do that I have:
- configured an
image_templatewithghcr.io/daenney/{{.ProjectName}} - Created a secret named
GH_PATwith a PAT that has the ability to work with packages, and set that as theGITHUB_TOKEN
Unfortunately, it fails to push with:
The push refers to repository [ghcr.io/daenney/gdqbot]
b3b3f5b6a923: Preparing
fb0113d63c91: Preparing
960cfde826a2: Preparing
denied: unauthenticated: User cannot be authenticated with the token provided.
: exit status 1
Error: The process '/opt/hostedtoolcache/goreleaser-action/0.149.0/x64/goreleaser' failed with exit code 1
I feel like I’m probably missing something incredibly obvious but I’m not sure what.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Unable to login to ghcr.io docker registry (service unavailable)
I was running docker login command in powershell. I've tried with both PAT and password, but it does not work.
Read more >Can't Login ghcr.io for docker registry with Github Enterprise ...
I'm using Github Enterprise Server and GitHub Actions. I realized message Docker login for 'ghcr.io' failed with exit code 1 and I did...
Read more >Connector to ghcr.io no longer works | Inedo Community Forums
Hello, I have a docker connector to ghcr.io (the github container registry) which authenticates with a personal access token.
Read more >docker login ghcr.io succeeded, but docker pull denied - Reddit
Hello, using Github actions, I've built a new docker image, which is a private package now. In the terminal, I login successfully:
Read more >Unable to create container instance of private Github ...
I am trying to create an Azure Container Instance of a private image on my ghcr.io (Github Container Repository).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As of today, it looks like these things are true:
GITHUB_TOKEN, but need to specifically setpackages: writein the job/workflowpermissionsdocker loginbefore running this action (e.g. usingdocker/login-action)Here is a complete working example
release.yml:It appears as though I’ve misunderstood how this was supposed to work together. This works: