Is it possible to change package visibility in bulk? #55094
Replies: 4 comments 4 replies
-
hi mike, To do this, follow these steps: Go to the "Settings" tab of your repository Here is an example using the GitHub API v3 and the First, generate a personal access token with the Replace The API response will include an array of objects, each representing a package version. Extract the Replace Note that the |
Beta Was this translation helpful? Give feedback.
-
As you suspected there is no way to set the visibility on a package basis at the moment. It is based on the visibility of the repo. There are restrictions in place, mostly oriented around public packages. Github doesn't want people to delete or make private, packages that are public as others may be dependent on them. So you can't delete a public package, even via the GraphQL API (private packages only may be deleted) If the repo has been forked from a public repo, you can't change the repo to a private one (and thus make the package private). You would have to [duplicate the repository and so it becomes a different repo. |
Beta Was this translation helpful? Give feedback.
-
I'm unable to even patch my own packages:
The package exists: {
"id": 5587224,
"name": "compilers/n64/gcc2.8.1sn",
"package_type": "container",
"owner": {
"login": "mkst",
"id": 22226349,
"node_id": "MDQ6VXNlcjIyMjI2MzQ5",
"avatar_url": "https://avatars.githubusercontent.com/u/22226349?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mkst",
"html_url": "https://github.com/mkst",
"followers_url": "https://api.github.com/users/mkst/followers",
"following_url": "https://api.github.com/users/mkst/following{/other_user}",
"gists_url": "https://api.github.com/users/mkst/gists{/gist_id}",
"starred_url": "https://api.github.com/users/mkst/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mkst/subscriptions",
"organizations_url": "https://api.github.com/users/mkst/orgs",
"repos_url": "https://api.github.com/users/mkst/repos",
"events_url": "https://api.github.com/users/mkst/events{/privacy}",
"received_events_url": "https://api.github.com/users/mkst/received_events",
"type": "User",
"site_admin": false
},
"visibility": "private",
"url": "https://api.github.com/users/mkst/packages/container/compilers%2Fn64%2Fgcc2.8.1sn",
"created_at": "2023-09-10T16:38:21Z",
"updated_at": "2023-09-10T17:12:18Z",
"html_url": "https://github.com/users/mkst/packages/container/package/compilers%2Fn64%2Fgcc2.8.1sn"
}, I get the same result whether I use the escaped name string (i.e. What am I doing wrong? [edit] Performing the action through the UI shows that a POST is made to |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hi,
I have a public git repo, and want to publish a set of docker containers to the github container registry, with public visibility.
However, I have two issues:
how can I make these containers public without clicking through the UI 200 times?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions