Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 2

Enabling private github packages

Solved! Go to Solution.

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?

1 Reply
Highlighted
Solution
Community Manager
Message 2 of 2

Re: Enabling private github 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-n...


My very best,
Andrea

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!