Fetch NPM package from private registry #poky
Hi,
We are using a private organization npm registry, but we are struggling a little bit with authentication.
We tried to setup the auth token in a before do_fetch task, but without any success yet.
What is the recommended way for using a private NPM registry?
Erwin
Hi Erwin,
I don't think registry authentication could work right now. When I implemented both npm fetchers I had no private registry to test it.
The only thing which is implemented is the alternate repository (tested with the frea registry: https://freajs.com). So you just have to update the yocto url from:
npm://registry.npmjs.org;package=foo;version=1.0.0
To something like that:
npm://registry.freajs.org;package=foo;version=1.0.0
But it is a public registry...
You should try to update both npm fetcher to add some authentication options to the url like this:
npm://private.registry.com;package=foo;version=1.0.0;authentication=foobar
Best regards,
Jean-Marie
Quoted 10 lines · On Thu, Aug 27, 2020 at 3:09 PM <[email protected]> wrote:
Hi,
We are using a private organization npm registry, but we are struggling a little bit with authentication.
We tried to setup the auth token in a before
do_fetchtask, but without any success yet.What is the recommended way for using a private NPM registry?
Erwin