v2: pushing to Github Container Registry fails
See original GitHub issueWhen pushing to the Github Container Registry, I get the following error:
#24 ERROR: server message: insufficient_scope: authorization failed
------
> exporting to image:
------
failed to solve: rpc error: code = Unknown desc = server message: insufficient_scope: authorization failed
##[error]The process '/usr/bin/docker' failed with exit code 1
The PAT has what I believe is the required scope: delete:packages, read:packages, repo, write:packages.
If the full workflow is useful, you can find it here: https://github.com/cicirello/alpine-plus-plus/blob/master/.github/workflows/docker-publish.yml
There are two jobs in the workflow, the first pushes to Docker Hub successfully. The second attempts to push to the Github Container Registry, and fails. The docker/login-action succeeds in logging in to the GitHub Container Registry.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Pushing to GitHub Container Registry fails with ...
Push the files to GitHub and it will trigger the workflow. Expected behaviour. The Docker image should be pushed to GitHub. Actual behaviour....
Read more >Error when pushing image to github · Issue #115
Hi @dirodriguezm,. With GitHub Container Registry you can only have a single namespace (user or org) compared to GitHub Package Registry. So in ......
Read more >Docker push to "Other Docker Container Registry" fails ...
Currently if i push to Other Docker Container Registry the tooling appends the scheme port to the container image tag. Which then fails...
Read more >Random 403 errors when pushing to GHCR · Issue #463
Troubleshooting Pushing to GHCR seems to randomly resulting in 403s in the last 24 hours. Rerunning the GH action seems to resolve things ......
Read more >Unable to push to ghcr.io from Github Actions #26274
Running the job doesnt allow pushing to the container registry: #20 pushing ghcr.io/REDACTED/REDACTED:master with docker #20 sha256:REDACTED ...
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 FreeTop 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
Top GitHub Comments
@crazy-max Awesome. Thanks. It was definitely due to my missing
ghcr.io/
at start of tags. It works now. It might be useful for v2 to have an example workflow for GHCR, as well as an example workflow for pushing to both Docker Hub and GHCR (e.g., your alpine-s6 workflow was helpful in simplifying mine).@cicirello
I have pushed to GHCR successfully on this repo with the following workflow (see https://github.com/users/crazy-max/packages/container/alpine-s6).
I would have thought that your scopes were not enough but it looks good to me.
But looking at the build command generated by the action, it looks like you forgot to prepend your tags with
ghcr.io/
.