-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
insufficient_scope: authorization failed #160
Comments
I'm having the same issues! |
@antoniofalcao Looks like the same issue as #162 when Git context is used. Can you use the Path context while waiting for a fix?: 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: Checkout
uses: actions/checkout@v2
-
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:
context: .
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 }} |
Yes adding |
Thank's @crazy-max, but i already used this approach, and had the same error. Applying suggestionname: 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: Checkout
uses: actions/checkout@v2
-
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:
context: .
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-xwP62S/iidfile --file ./src/Dotnet5.GraphQL3.Store.WebAPI/Dockerfile --push . Logs
Any suggestion? |
@antoniofalcao Looks like antoniofalcaojf/dotnet5-graphql3-webapi is missing on Docker Hub. Is it a private repo? |
It's public: https://hub.docker.com/repository/docker/antoniofalcaojr/dotnet5-graphql3-webapi |
@antoniofalcao So it's a typo in your workflow:
|
OMG! So sorry about that! It's working now. Thanks! |
* testing docker from github * minor fix to travis-ci * changed branch to $TRAVIS_BRANCH * adding env variables * adding env variables * double checking that travis variables are set up * double checking that travis variables are set up * double checking that travis variables are set up * changing from deploy tag to after_success tag * lowercase slug * trying to fix the build tag name * trying to fix the build tag name * chewbbaca with python3 * chewbbaca with python3 * debugging docker tag * debugging docker tag * debugging docker tag * debugging docker tag * debugging docker tag * debugging docker tag * fixing docker tag * fixing docker login * explicitly giving lskatz for username * secret variable space * trying to get secret env variables for docker login * trying out docker caching * Update .travis.yml * fix "docker save" * trying the other kind of caching * fixed single quote * view dockerImages.stdout * added cache folder * test for size of dockerImages.stdout * from xargs to bash loop * fixed a quote * a quick rm cache * Update .travis.yml * after removing all cache * rm cache * checking if file exists * rm cache * back to normal * Create travis-docker.yml * Update travis-docker.yml * Update travis-docker.yml * docker login * passwordless login * docker build * updating run commands for variable printing * updating run commands for variable printing * updating run commands for variable printing * more debugging; switching build directory to HOME * more debugging * more debugging * more debugging * actions/checkout@v2 * actions/checkout on this branch * actions/checkout on this branch * actions/checkout on this branch * actions/checkout on this branch * fixed space typo * fixed working directory during docker build * fixed working directory during docker build * fixing docker build * fixing docker build * fixing docker build * fixing docker build * fixing docker build * trying docker push * using a more appropriate env variable * fixed case on docker tag * moving env out of job and to global * separating out to multiple jobs that depend on each other, in preparation for any concurrency * some concurrency * m * m * added some debugging * m * added init and debugging jobs * init needs debugging * exporting REMOTE_TAG * figuring out variable continuity * figuring out variable continuity * passing outputs between jobs * passing outputs between jobs * passing outputs between jobs * debugging more * debugging more * debugging more with JSON * debugging more with JSON * debugging more with JSON2 * moved git checkout to init job * maybe I needed to do fromJSON. And moved git checkout back. * JSON3 * JSON3 * JSON4 * JSON5 * JSON6 * test slug * removed all underscores and dashes in this output chain * export slug * export slug2 * just trying to make env work at all * env2 * env3 * making the env work properly with format() * env2 * env3 * env4 * env5 * env6 * trying things out * trying things out * trying things out * trying things out * trying things out * just making the variables work * docker cache action * docker cache action * Trying to follow satackey more closely * Update travis-docker.yml * added docker login * login before tagging * Rename travis-docker.yml to travis-docker.yml.bak * Create github-docker.yml * removed needs:init * corrected the docker repo * pushing to both docker and github https://docs.github.com/en/actions/guides/publishing-docker-images * renamed the github container name from my-image to sneakernet * tags: latest * adding extra LC_ALL to the end * newer blast in Dockerfile * blast library COPY statements * reverting blast libs * getting blast from mlst container * manual installation of staramr * manual installation of staramr2 * tag with hashsum values too * trying to invoke the sha sum * adding apt-get packages for staramr * trying out docker push v2 * trying docker action v2 * fixed newline error * removed ipython-notebook * Update github-docker.yml * Update Dockerfile * numpy installation through pip now * Removing multistage for pip-based images * fixed apt-get command syntax * changed tags to a value instead a list * updated the tag docker/build-push-action#160 * list of tags * pushing to the github registry (?) * one space before pipe * Not sending to github packages; yes sending multiple tags to dockerhub * removed list again * Rename github-docker.yml to github-docker.yml.bak * Create build-and-push-container.yml * added this branch for github actions * added libpython3.5-dev ``` #130 [linux/386 stage-11 34/47] RUN pip3 install poetry && git clone https:/... #130 11.73 building '_openssl' extension #130 11.73 creating build/temp.linux-x86_64-3.6/build #130 11.73 creating build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6 #130 11.73 i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c build/temp.linux-x86_64-3.6/_openssl.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_openssl.o -Wconversion -Wno-error=sign-conversion #130 11.73 build/temp.linux-x86_64-3.6/_openssl.c:50:14: fatal error: pyconfig.h: No such file or directory #130 11.73 # include <pyconfig.h> #130 11.73 ^~~~~~~~~~~~ #130 11.73 compilation terminated. #130 11.73 error: command 'i686-linux-gnu-gcc' failed with exit status 1 #130 11.73 ---------------------------------------- #130 11.73 ERROR: Failed building wheel for cryptography #130 11.73 Failed to build cryptography #130 11.74 ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly #130 ERROR: executor failed running [/bin/sh -c pip3 install poetry && git clone https://github.com/hcdenbakker/SalmID.git --branch 0.1.23 --single-branch && cd SalmID && poetry build -vvv && pip3 install dist/salmid*.whl]: buildkit-runc did not terminate successfully ``` * fixed libpython-dev * libpython3-dev * newline. Does it make things work * separate some pip3 installations for staramr; removed numpy pip3 * removing staramr and salmid for right now * removed all platforms except linux/amd64 * uncomment pip commands * combined some pip commands for fewer layers * Combined some chewbbaca steps into single layers * RUN echo "LC_ALL=C" >> /etc/environment * switched to UTF-8 per instructions * apt-get install locales Co-authored-by: Lee Katz - Aspen <[email protected]>
hello, if anybody else gets stuck on this like i did, here's what i did to solve it i had to fix my - name: push image - server
uses: docker/build-push-action@v2
with:
file: ./s/Dockerfile
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}/server:${{ github.sha }} where
this fixed the issue in my case, particularly adding the |
Hello, If someone is having the same issue, the solution for me was push to a new repository:
|
I had this too, make sure myuser is set to you real docker username; that's what caused my Action to fail! |
For me the problem was that I had to login in Docker on the command line: |
Hiding in plain sight!! Thanks a million! It was just changing user for me though, but same line |
Recommended by docker/build-push-action#160
Strangely enough, I was getting this error because of a mismatch between the name given to a build stage and the name used in a COPY --from=... instruction. I fortunately stumbled on this answer, which got me looking at the FROM and COPY instructions in my Dockerfile. I feel like incongruencies between build stage names in FROM and COPY instructions could probably be caught by syntax validation before cascading, somehow, to an auth failure. Hope this helps somebody, I spent way too much time on this snafu. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Trying to make dockerhub publishing work with inspiration from this example: https://docs.docker.com/build/ci/github-actions/multi-platform/ * Set `with.context: .` * bump step versions It fails with the following error ``` insufficient_scope: authorization failed ``` Which led me to this thread: docker/build-push-action#160
Hi, I have a similar problem but none of above solutions works for me. In my case, docker/metadata-action cause the same error following:
Orignal workflow(error):
Moving docker/metadata-action before docker/login-action shows silightly different error:
It works without a docker/metadata-action step. docker/build-push-action:
|
Behaviour
Steps to reproduce this issue
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
Command produced
Logs
The text was updated successfully, but these errors were encountered: