3

When I tried to push the github action build package into github container registry, shows error like this:

#21 pushing layer 71bf85df11bc 0.5s done
#21 pushing layer 2e8dc9c47172 0.5s done
#21 pushing layer cdd7c7392317 0.5s done
#21 ERROR: denied: installation not allowed to Create organization package
------
 > pushing ghcr.io/jiangxiaoqiang/rust-musl-builder:beta with docker:
------
ERROR: denied: installation not allowed to Create organization package
Error: buildx call failed with: ERROR: denied: installation not allowed to Create organization package

I am using personal user right now, does this only support for organization? I have tried to create a classic token but when I add the GITHUB_TOKEN the system told that this is the system environment maintained by github.

what should I do to fixed this problem? did I have to switch my project to an organization?

Dolphin
  • 29,069
  • 61
  • 260
  • 539
  • 1
    It should be published to your repo as well. With the correct packages scope permissions, it should work. There's no permissions set in your [workflow](https://github.com/jiangxiaoqiang/rust-musl-builder/blob/main/.github/workflows/ci.yml). See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages. – Azeem Jul 04 '23 at 04:27

1 Answers1

2

tried to add permisson configuration in the gihub workflow:

build_and_push:
    name: Build image & push
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

works.

Dolphin
  • 29,069
  • 61
  • 260
  • 539