insufficient_scope: authorization failed
See original GitHub issueBehaviour
Steps to reproduce this issue
- Set up QEMU
- Set up Docker Buildx
- Login to DockerHub
- Build and push
Expected behaviour
Publish image to docker hub
Actual behaviour
ERROR: server message: insufficient_scope: authorization failed
Configuration
https://github.com/AntonioFalcao/Dotnet5.GraphQL3.WebApplication https://hub.docker.com/repository/docker/antoniofalcaojr/dotnet5-graphql3-webapi
name: Push API Image
on:
push:
branches: master
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
file: ./src/Dotnet5.GraphQL3.Store.WebAPI/Dockerfile
push: true
tags: antoniofalcaojf/dotnet5-graphql3-webapi:latest
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
Command produced
/usr/bin/docker buildx build --tag antoniofalcaojf/dotnet5-graphql3-webapi:latest --iidfile /tmp/docker-build-push-lDmUS3/iidfile --secret id=GIT_AUTH_TOKEN,src=/tmp/docker-build-push-lDmUS3/tmp-3384-twk4xwQeuxwk --file ./src/Dotnet5.GraphQL3.Store.WebAPI/Dockerfile --push https://github.com/AntonioFalcao/Dotnet5.GraphQL3.WebApplication.git#heads/release
Logs
#33 exporting to image
#33 exporting layers
#33 exporting layers 2.4s done
#33 exporting manifest sha256:3c6a2a955932783e726461031bee8657c2ec7f2b2f239c110ba44ae58effef69 done
#33 exporting config sha256:6d39eefff02cee7c50511f16bd824957f3ef082ed60324850954a5aa3b13a5ee done
#33 pushing layers
#33 pushing layers 0.2s done
#33 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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:12
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Dockerfile build raising insufficient_scope: authorization failed ...
First I though it was an authentication problem so I logged in the Docker desktop, but still it does not work. Is there...
Read more >Push to Azure container registry using Helm throws Error
Push to Azure container registry using Helm throws Error: server message: insufficient_scope: authorization failed.
Read more >Docker image can be pushed to one repo, but not another
I want to build Docker images and push them to the repository using, e.g., main/foo/foo:latest , but I also want to push customer-specific ......
Read more >Unable to pull private docker image during pipeline - Jira
... registry endpoint: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed.
Read more >Failure to build image FROM an image that already exists locally
... pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed.
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
hello, if anybody else gets stuck on this like i did, here’s what i did to solve it
i had to fix my
tags
setting:where
${{ env.REGISTRY }}
is equivalent withghcr.io
(the github packages registry)${{ github.repository }}
is equivalent withchase-moskal/xiome
(my github name and private repo’s name)server
is the name i decided for my docker image, since my repo is pushing multiple different images${{ github.sha }}
is simply the commit id, which i’m using to identify my staging images (i plan to use git v tags for real production releases)ghcr.io/chase-moskal/xiome/server:69aa49cd2994f2063f908dd8868f1aa4da2385bddfbc0e069534a7fa5865cb08
this fixed the issue in my case, particularly adding the
ghcr.io/
prefixOMG! So sorry about that! It’s working now. Thanks!