Enabling private github packages

We are trying to create our first private git-hub package, but we get the following error:

npm ERR! code EPRIVATE
npm ERR! This package has been marked as private
npm ERR! Remove the ‘private’ field from the package.json to publish it.

How do we enable private packages? I see from https://github.com/features/packages that it says “GitHub Packages is not available for private repos in legacy per-repository plans.”  How do I determine if that applies to me?  We have had a plan allowing private repositories for some time, but I don’t think it is “per-repository”, it’s based on our organization.   Is there something else I need to do to enable private packages?

Hi @jeconneely,

Thank you for being here! I’m sharing the reply from our support team as it might help someone in the same situation:

npm ERR! Remove the ‘private’ field from the package.json to publish it.

npm has a confusing definition of private packages. They are packages that should never be published anywhere (hence the error).

What we mean by private packages is packages that are associated with a private repository. You will need a PAT with access to that repository and the read:packages scope in order to access them

How do we enable private repositories?

You should remove the private field and instead associate the package with a private repository.

See: https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#publishing-multiple-packages-to-the-same-repository