Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker buildx Error : rpc error: code = Unknown desc = server message: insufficient_scope: authorization failed

I'm new to Docker and trying to perform CI using GitHub Actions.

Here's my .yml file on GitHub.

name: CI to Docker Hub
on:
 push:
   branches: [main]
 pull_request:
   branches: [main]

jobs:
 build:

  runs-on: ubuntu-latest

   steps:
  - name: Check Out Repo
    uses: actions/checkout@v2

  - name: Login to Docker Hub
    uses: docker/login-action@v1
    with:
      username: ${{ secrets.DOCKER_HUB_USERNAME }}
      password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

  - name: Set up Docker Buildx
    id: buildx
    uses: docker/setup-buildx-action@v1

  - name: Build and push
    id: docker_build
    uses: docker/build-push-action@v2
    with:
      context: .
      file: ./Dockerfile
      push: true
      tags: your-order-backend:latest

  - name: Image digest
    run: echo ${{ steps.docker_build.outputs.digest }}

I have added Secrets in my Github too of Docker Hub. I'm not sure why, but it is failing at > exporting to image:

enter image description here

like image 399
Sagar Bajpai Avatar asked Feb 26 '21 06:02

Sagar Bajpai


1 Answers

It is resloved! In my case, there was no repo in the Docker Hub created whose tag I have passed here in the yml file. I created the repo and it worked

like image 132
Sagar Bajpai Avatar answered Sep 29 '22 14:09

Sagar Bajpai