Publishing package with scope different from username #52267
-
Select Topic AreaQuestion BodyI've been trying for a while to publish a package from a Yarn monorepo to Github Packages associated with a private repo, and I'm running out of things to Google to try and fix my issue. The main difference I'm seeing with the many tutorials out there is that the scope I'm trying to publish my package to ( If I publish with the scope changed to Do I need to use organisations for this? is there no way I can publish with an arbitary scope for a private repo for private access? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi there @xenobytezero 👋🏽 In GitHub Packages, the scope for a package should match the owner of the repository when publishing to a user account. In your case, since you're publishing to a private repository owned by However, if you want to use an arbitrary scope (like To create an organisation and set up the desired scope:
After completing these steps, you should be able to publish packages under the Please note that creating an organisation may require a paid plan to enable private repositories within the organisation. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Yep, creating an organisation lets me do what I need to. Was just a little unclear in the documentation. Thanks for your response! |
Beta Was this translation helpful? Give feedback.
Hi there @xenobytezero 👋🏽
In GitHub Packages, the scope for a package should match the owner of the repository when publishing to a user account. In your case, since you're publishing to a private repository owned by
xenobytezero
, you should use the@xenobytezero
scope for your package.However, if you want to use an arbitrary scope (like
@ges
), you can create an organisation on GitHub with that name. This would allow you to publish packages under the@ges
scope.To create an organisation and set up the desired scope:
Create a GitHub organisation: Follow the documentation on creating a new organisation and choose the name that matches your desired scope (e.g., "ges").
Transfer your re…