Private packages access permissions per repository or organisation #56419
Replies: 5 comments 2 replies
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
To be honest this is currently the single biggest problem that is making me question whether or not to use github packages and switch to another provider |
Beta Was this translation helpful? Give feedback.
-
The fact that we have to explicitly go in an add each repository via the Manage Actions access is painful. Also, problematic as we need to do so for every new repository created. Has anyone found a way to grant this at the Organization level? It'd be great if we can just say trust all repositories in our Organization to have access. |
Beta Was this translation helpful? Give feedback.
-
I'm Brazilian, so please excuse the grammar mistakes
GitHub Packages: Since you mentioned using GitHub, you can use GitHub Packages in conjunction with GitHub Actions to automate publishing and access control. Set up a private registry on GitHub and use permissions policies to manage access. Nexus Repository Manager: This is a tool that can be used to manage npm package repositories, with fine-grained access controls. Verdaccio: A local npm registry that allows you to configure access permissions on a per-package basis.
Configure an Authentication Token: Create a personal access token with appropriate permissions for reading packages. Add Settings to .npmrc: In the .npmrc file of the repositories that need access to the packages, add the settings to use the authentication token. For example: In each package's settings, you can set permissions for the entire organization, allowing any repository in the organization to have read access. Using the GitHub API: Use scripts that call the GitHub API to set read permissions on all packages at once. For example, a Node.js script using axios to call the API: javascript const GITHUB_TOKEN = 'YOUR_TOKEN'; const ORG_NAME = 'your-org'; async function setPackagePermissions(packageName) { async function main() { main().catch(console.error); |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Packages
Question: Is there a way to give read access to packages at a repository level or enable all packages to access other packages inside the organisation regardless of which repository it's in?
Body
Context:
We are publishing a lot of npm packages via a monorepo setup (a single private repo). These packages can end up being used by other repositories, in completely different contexts. We therefore need to give permissions from other repositories to access these packages.
I couldn't find anything relating to this in the public docs or in this community. Currently it only seems to be possible to manage npm package access individually in its settings: https://github.com/orgs/{org}/packages/npm/{package}/settings.
Why?
To solve the above we have to manually edit permissions for every single package. This gets exponentially worse if we increase the number of repositories that require access.
Beta Was this translation helpful? Give feedback.
All reactions