Github action cannot push the image to ghcr

Every time the action tries to build an image, it fails on pushing it to the registry. I haven't even done any customization to it yet.
[09:18:01 g.i/k/test-image:latest] => #35 ERROR: failed to push ghcr.io/krzychhoo/test-image:latest: unexpected status from POST request to https://ghcr.io/v2/krzychhoo/test-image/blobs/uploads/: 403 Forbidden
[09:18:01 g.i/k/test-image:latest] => ------
[09:18:01 g.i/k/test-image:latest] => > exporting to image:
[09:18:01 g.i/k/test-image:latest] => ------
[09:18:01 g.i/k/test-image:latest] => ERROR: failed to solve: failed to push ghcr.io/krzychhoo/test-image:latest: unexpected status from POST request to https://ghcr.io/v2/krzychhoo/test-image/blobs/uploads/: 403 Forbidden
[09:18:01 ERROR] => Failed:
× Failed to build image ghcr.io/krzychhoo/test-image:latest

Error: Process completed with exit code 1.
[09:18:01 g.i/k/test-image:latest] => #35 ERROR: failed to push ghcr.io/krzychhoo/test-image:latest: unexpected status from POST request to https://ghcr.io/v2/krzychhoo/test-image/blobs/uploads/: 403 Forbidden
[09:18:01 g.i/k/test-image:latest] => ------
[09:18:01 g.i/k/test-image:latest] => > exporting to image:
[09:18:01 g.i/k/test-image:latest] => ------
[09:18:01 g.i/k/test-image:latest] => ERROR: failed to solve: failed to push ghcr.io/krzychhoo/test-image:latest: unexpected status from POST request to https://ghcr.io/v2/krzychhoo/test-image/blobs/uploads/: 403 Forbidden
[09:18:01 ERROR] => Failed:
× Failed to build image ghcr.io/krzychhoo/test-image:latest

Error: Process completed with exit code 1.
7 Replies
krzychhoo
krzychhooOP3mo ago
GitHub
GitHub - krzychhoo/test-image
Contribute to krzychhoo/test-image development by creating an account on GitHub.
krzychhoo
krzychhooOP3mo ago
this is the repo
xyny
xyny3mo ago
the error message seems to be different, but this is your issue https://blue-build.org/learn/troubleshooting/#ghcrio-denied-permission_denied-write_package
BlueBuild
Troubleshooting, reporting bugs, and common issues
What to do when builds are failing
xyny
xyny3mo ago
the test-image image name already exists on your account, so the new repo is not given permissions to write to it
krzychhoo
krzychhooOP3mo ago
ohhhh right i think i did once have a repo called test-image from the old ublue startpoint repo
xyny
xyny3mo ago
@Luke Skywunker did you change the error message that's logged or the push method or something?
Luke Skywunker
Luke Skywunker3mo ago
No, that's just the consequence of building with Docker in order to push the images I have to declare it in the build step because I'm using buildx. I am working on a way to try to enhance the Docker logs to make them a little bit easier to read, because the current plain text form looks downright awful.
Want results from more Discord servers?
Add your server