Skip to content
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

HttpError: Package not found when trying to delete it #27

Open
migueluzcategui opened this issue Dec 6, 2022 · 9 comments
Open

HttpError: Package not found when trying to delete it #27

migueluzcategui opened this issue Dec 6, 2022 · 9 comments

Comments

@migueluzcategui
Copy link

For some reason the action is not able to delete de package,

I am using the version-pattern to filtering and I am able to retrieve the package I want to delete, but when I tries to delete it fails.

Screenshot 2022-12-06 at 17 08 27

I am doing anything wrong? I am 100% sure that the package exists but I don't know why it's not working.

@migueluzcategui migueluzcategui changed the title HttpError: Package not found after filter HttpError: Package not found when trying to delete it Dec 6, 2022
@rubengees
Copy link
Member

No, this looks like a bug. Let me see if I can reproduce.

@rubengees
Copy link
Member

Hmm, I setup the same case you have here and could delete the package. The only thing that comes to mind is that the token does not have permissions to delete the package. Does the token have the required permissions according to https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages?

The token I am testing with has these: delete:packages, repo, write:packages.

@migueluzcategui
Copy link
Author

migueluzcategui commented Dec 15, 2022

@rubengees I double checked and have all the scopes needed (and even more) but I still have a problem when I try to delete the versions of my organisation, the odd is that I have access to read those versions. this used to work 2 months ago.
Screenshot 2022-12-15 at 16 14 40

Additionally to this, I checked with a token with less scopes and I was no even able to get the versions.

@xxsnakerxx
Copy link

Screenshot 2023-02-28 at 19 10 22

The same issue. The token has correct permissions delete:packages, repo, write:packages

@rubengees
Copy link
Member

The new version 0.7.0 has been released. Does it work in that version?

@xxsnakerxx
Copy link

Nope :(
Screenshot 2023-04-14 at 12 25 55

@T-helper
Copy link

Recently faced with same behavior, but in my case the root of cause was that i was using personal private repo instead of organisation repo, as it was before. So replaced "organization:" with "user:" directive fixed that problem

@ministrudels
Copy link

ministrudels commented Apr 27, 2023

This is happening because the token you are using does not have the required permissions to delete the packages you are asking for. Check what repositories have access to your package under Package settings. The repo running the action must have admin access to be able to delete the package. Instead of using a PAT, try using the automatically generated GITHUB_TOKEN .

@xxsnakerxx
Copy link

Yes, I removed the token arg and now it works! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants