opendevstack / ods-pipeline

Alternative ODS CI/CD pipeline based on Tekton / OpenShift Pipelines
Apache License 2.0
13 stars 5 forks source link

`_auth` in `.npmrc` needs to be scoped to a registry when using Node 18 #668

Closed henninggross closed 1 year ago

henninggross commented 1 year ago

When using the node18-npm-toolset the following warning is logged:

Configuring npm to use Nexus (https://...) ...
npm WARN config `_auth`, `_authToken`, `username` and `_password` must be scoped to a registry. see `npm help npmrc` for more information.

Running npm help npmrc gives the following:

In order to scope these values, they must be prefixed by a URI fragment.
If the credential is meant for any request to a registry on a single host, the scope may look like //registry.npmjs.org/:.
If it must be scoped to a specific path on the host that path may also be provided, such as //my-custom-registry.org/unique/path:.

We should update the npm config to have a scoped _auth value.