Search code examples
authenticationnpmazure-artifacts

NPM packages management using VSTS


I'm having trouble publishing npm packages using using Package Management feeds.

>vsts-npm-auth -config .npmrc


vsts-npm-auth v0.25.0.0
----------------------
Creating npmrcFile. Path: H:\.npmrc
Getting new credentials for source:https://########.pkgs.visualstudio.com/_packaging/########/npm/registry/, scope:vso.packaging_write vso.drop_write


>npm publish
...

npm ERR! need auth auth required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`

What am I missing here?


Solution

  • The .npmrc file (with the "_authToken"), was generated by the vsts-npm-auth -config .npmrc in the H: drive.

    I manually moved it to the user folder in order to make the npm publish working.