How should I set _auth in .npmrc when using a Nexus https npm registry proxy?

Sources: https://help.sonatype.com/repomanager3/nexus-repository-administration/formats/npm-registry/npm-security
& https://help.sonatype.com/repomanager3/nexus-repository-administration/formats/npm-registry/publishing-npm-packages

  1. Configure registry (its important doing this before configuring the authentication in step 2, because the authentication settings will be based on the registry):

    npm config set registry=”http://localhost:8081/repository/npm-internal/”

  2. Configure authentication using a line like the following example:

    npm config set _auth=”$(echo -n ‘username:password’ | base64)”

  3. Check the current configuration using the following:

    npm config ls

  4. Publish your npm package:

    npm publish –registry http://localhost:8081/repository/npm-internal/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)