I'm running nexus repo manager oss3.2.1 on a local machine.
I have defined three npm repos in nexus:
- [PUBLIC] - a proxy for public npm registry
- [PRIVATE] - a private repository for my own packages
- [NPM] - a group repository, allowing access to [PRIVATE] and [PUBLIC] in this order
I've added npm Bearer Token Realm in Settings/Security/Realms
I can download packages from [PUBLIC], which works as intended.
I can easily download packages from public:
.npmrc
registry=http://localhost:8081/repository/PUBLIC
npm install react // works fine, downloads from [PUBLIC]
also can download from npm:
.npmrc
registry=http://localhost:8081/repository/NPM
npm install react // works fine, downloads from [PUBLIC]
But can't download from private because there's no package named react
I don't want to publish to public and I can publish packages to private.
.npmrc
registry=http://localhost:8081/repository/PRIVATE
npm publish // works fine, publishes to [PRIVATE]
The problem is I can't publish to npm:
.npmrc
registry=http://localhost:8081/repository/NPM
npm publish // fails, should publish to [PRIVATE]
// gets HTTP 400
Here's the detailed log of the error: https://pastebin.com/5GuqNNhf
I know that I can set up different url(s) to publish packages usig publishConfig in package.json but that's just duplicating the config. Can I do this with nexus group repo?