Failed to copy and 403 errors on container registry push from GitHub Action, even when write permissions are given in package settings

Troubleshooting

I have four very similar dockerfiles in one project that are called upon during a push or pull request,
creating four ghcr packages.

Or at least, that’s what it’s supposed to do, because two of them are not created, while none of them are errorfree.

All four of them have been given write and read access of GitHub Actions for repositories in the container settings.

joinnode-ipv4
I can only put two links in this post, so you’ll have my word that the other three have the same settings.

Behaviour

Steps to reproduce this issue

  1. Kick off the four Github actions through push or pull request.

Expected behaviour

Builds should complete with no issue.

Actual behaviour

Two 403 errors
Two failed to copy errors

Configuration

Logs

I can only put two links in a post as a user.

I’ve discovered that I can’t upload them via CLI either.

[folaht@pjehrsohmehj joinnode-ipv4]$ podman image push ghcr.io/safenetwork-community/joinnode-ipv4:main
Getting image source signatures
Error: trying to reuse blob sha256:e2eb06d8af8218cfec8210147357a68b7e13f7c485b991c288c2d01dc228bb68 at destination: Requesting bear token: invalid status code from registry 403 (Forbidden)
[folaht@pjehrsohmehj joinnode-ipv4]$ podman login ghcr.io
Username: folaht
Password:
Login Succeeded!
[folaht@pjehrsohmehj joinnode-ipv4]$ podman image push ghcr.io/safenetwork-community/joinnode-ipv4:main
Getting image source signatures
Copying blob 517b4d372277 [--------------------------------------] 8.0b / 3.5KiB
Copying blob 53f58c53b72e [--------------------------------------] 8.0b / 11.5KiB
Copying blob e2eb06d8af82 [--------------------------------------] 8.0b / 5.6MiB
Copying blob 28f149d4d6bf [--------------------------------------] 8.0b / 7.5MiB
Copying blob bbadcc20b8fc [--------------------------------------] 8.0b / 53.8MiB
WARN[0001] failed, retrying in 1s ... (1/3). Error: writing blob: initiating layer upload to /v2/safenetwork-community/joinnode-ipv4/blobs/uploads/ in ghcr.io: denied: permission_denied: The token provided does not match expected scopes.
Getting image source signatures
Copying blob 53f58c53b72e [--------------------------------------] 8.0b / 11.5KiB
Copying blob 517b4d372277 [--------------------------------------] 8.0b / 3.5KiB
Copying blob e2eb06d8af82 [--------------------------------------] 8.0b / 5.6MiB
Copying blob 28f149d4d6bf [--------------------------------------] 8.0b / 7.5MiB
Copying blob bbadcc20b8fc [--------------------------------------] 8.0b / 53.8MiB
WARN[0003] failed, retrying in 1s ... (2/3). Error: writing blob: initiating layer upload to /v2/safenetwork-community/joinnode-ipv4/blobs/uploads/ in ghcr.io: denied: permission_denied: The token provided does not match expected scopes.
Getting image source signatures
Copying blob 517b4d372277 [--------------------------------------] 8.0b / 3.5KiB
Copying blob 53f58c53b72e [--------------------------------------] 8.0b / 11.5KiB
Copying blob e2eb06d8af82 [--------------------------------------] 8.0b / 5.6MiB
Copying blob 28f149d4d6bf [--------------------------------------] 8.0b / 7.5MiB
Copying blob bbadcc20b8fc [--------------------------------------] 8.0b / 53.8MiB
WARN[0004] failed, retrying in 1s ... (3/3). Error: writing blob: initiating layer upload to /v2/safenetwork-community/joinnode-ipv4/blobs/uploads/ in ghcr.io: denied: permission_denied: The token provided does not match expected scopes.
Getting image source signatures
Copying blob 53f58c53b72e [--------------------------------------] 8.0b / 11.5KiB
Copying blob 517b4d372277 [--------------------------------------] 8.0b / 3.5KiB
Copying blob e2eb06d8af82 [--------------------------------------] 8.0b / 5.6MiB
Copying blob 28f149d4d6bf [--------------------------------------] 8.0b / 7.5MiB
Copying blob bbadcc20b8fc [--------------------------------------] 8.0b / 53.8MiB
Error: writing blob: initiating layer upload to /v2/safenetwork-community/joinnode-ipv4/blobs/uploads/ in ghcr.io: denied: permission_denied: The token provided does not match expected scopes.