Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Support publishing private packages, if desired #2514

wants to merge 1 commit into


None yet
4 participants

jhs commented Jun 11, 2012

This is pretty simple.

npm config set publish-privates true

Or, edit an individual package.json

"publishConfig": {"publish-privates": true}

Voila. Now npm will log.info() a message but otherwise let it happen. I think the official registry should ban all private packages though.


davglass commented Mar 28, 2013

This is interesting to me, but I was thinking something like this too:

"private": "http://my-personal-registry.com"

Then npm publish will only allow a publish to this registry.

I do agree that if the private key is set, the official npm registry should bounce the publish


domenic commented Mar 28, 2013

I really like @davglass's idea.


davglass commented Mar 28, 2013

I'm constantly battling between several private registry's, this would just help the accidental publishing.

If @izs would be kind enough to weigh in, I'd be happy to submit a proper PR for this.


mfncooper commented Mar 30, 2013

@davglass isn't what you're proposing the same as what you can do today with this?

"publishConfig": {
    "registry": "http://my-personal-registry.com"

davglass commented Mar 30, 2013

I've never seen that config before.


domenic commented Jun 18, 2013

I think publishConfig solves this quite nicely.

@domenic domenic closed this Jun 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment