-
Notifications
You must be signed in to change notification settings - Fork 585
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
Random 403 errors when pushing to GHCR #463
Comments
To be clear, I have multiple actions that each build docker images for different apps failing, see https://github.com/jauderho/dockerfiles I currently count 5 so it does not appear to an isolated issue. |
same issue here, not on all images but some and its quite systematic |
@markphelps Looks similar to #251 |
Just saw a suggestion on the orange site: https://news.ycombinator.com/item?id=28607735 I'm trying it out now and will report back. |
As the ephemeral
As I can see you're not using a self-hosted runner so it's not your case.
Don't think it will change smth as |
Nope, it did not work. Still fails. |
Also facing this issue, it seems to happen intermittently but more times than not. |
I have verified the following steps work for me to resolve the issue, however, this is not ideal.
Maybe this can shed a light into what's happening @chrispat ? Build that failed: Build that passed after deleting the image from GHCR: |
I have also tried toggling |
I'm experiencing the same problem. I'm logging with
And trying to push with this action:
This is how the output tail looks like:
|
@onedr0p How are you getting to that dialog? My google-fu is failing me today and I am unable to find the location so that I can check that setting. Thanks. |
You can find it in https://github.com/orgs/[XXX]/packages/container/[YYY]/settings or by going to the package page then "package settings" |
I can confirm that @onedr0p 's solution seems to work. I have now rebuilt two images with no issue and are rerunning jobs on my remaining failed actions. To reiterate, the steps are:
What's odd is that as I went through and checked the settings for all of my packages (21!), it seemed some were already set this way and seem to be the ones not having issues. I wonder if there was some backend maintenance and somehow these settings were lost. Can someone from GitHub investigate and confirm? Update: All of my images have successfully built. |
This comment has been minimized.
This comment has been minimized.
I'm also seeing this problem on push to a PR, but not on push for tags. So it might be somehow related to the metadata, which is different between PR push and tag? In my case these were the tags for a build that didn't work:
but these tags worked:
In my case the image did not exist at all to begin with, so I couldn't follow the steps in #463 (comment). |
Not related to that issue but check permissions of the Closing this issue as it seems to be solved. |
Switching to a PAT worked for me. I used this action and Once I returned to a PAT it worked flawlessly. |
I think this 403 has to do with how the github packages registry resolves. Using any varient of |
I'm feeling dumb. Where is the |
@rupe120 it's on the user/org page. In your case: 4th tab on the top. https://github.com/rupe120?tab=packages |
* Updates the README to direct users to use GitHub Packages for pulling the image. * Updates the GitHub Actions workflow to not logout due to multiple runner push failures. (See [#463](docker/build-push-action#463 (comment)))
* Updates the README to direct users to use GitHub Packages for pulling the image. * Updates the GitHub Actions workflow to not logout due to multiple runner push failures. (See [#463](docker/build-push-action#463 (comment)))
I read somewhere in the GHA docs that if you publish a package via a workflow, but that workflow did not initially create the package, then it "would" or "could" fail -- don't remember which. I believe it had to do with how the package is linked to the repo. I tried to find these docs again but could not. |
Yeah i'm also having the same issue as @ChristopherRabotin how do we create a new package? When trying to push a new package that doesn't exist for the first time it just errors... |
@mdsitton what's your yaml like? Despite the permissions above, I had to add the write permissions too : https://github.com/nyx-space/nyx/blob/master/.github/workflows/python.yml#L153 |
docker/build-push-action#463 (comment) Signed-off-by: Jacob Weinstock <[email protected]>
Probably not ideal to have write-all permission. I'm still seeing this very issue today. |
thx @onedr0p (small world) If you face this issue either someone already created a package with this name so it doesn't "inherit" from the repo or you may have inherit permissions off on the org/repo so you just have to do it yourself |
Deleting the images created using another token worked for me. |
as the above comments mentioned i had an old package that i created using a PAT, and my repo didn't had permissions to write for same packages. that's the reason behind the permission denied error. Just delete the old package 💃 |
Troubleshooting
Pushing to GHCR seems to randomly resulting in 403s in the last 24 hours. Rerunning the GH action seems to resolve things (partially).
Behaviour
See above.
Failure message :
buildx failed with: error: failed to solve: unexpected status: 403 Forbidden
Steps to reproduce this issue
Expected behaviour
Builds should complete with no issue.
Actual behaviour
See https://github.com/jauderho/dockerfiles/actions/runs/1255324536
Configuration
https://github.com/jauderho/dockerfiles/blob/main/.github/workflows/tailscale.yml
The text was updated successfully, but these errors were encountered: