Package: npm Authenticate task (for task runners)

Azure Pipelines

Use this task in a build or release pipeline to provide npm credentials to an .npmrc file in your repository for the scope of the build. This enables npm task runners like gulp and Grunt to authenticate with private registries.

Note

If you are using the npm task, you do not need to use the npm authenticate task. Instead use the feed configuration parameters that are available in the npm task.

YAML snippet

# npm authenticate (for task runners)
# Don't use this task if you're also using the npm task. Provides npm credentials to an .npmrc file in your repository for the scope of the build. This enables npm task runners like gulp and Grunt to authenticate with private registries.
- task: npmAuthenticate@0
  inputs:
    #workingFile: # Optional
    #customEndpoint: # Optional

Arguments

ArgumentDescription
.npmrc file to authenticate(Optional) Path to the .npmrc file that specifies the registries you want to work with. Select the file, not the folder e.g. "/packages/mypackage.npmrc".
Credentials for registries outside this account/collection(Optional) Credentials to use for external registries located in the project's .npmrc. For registries in this account/collection, leave this blank; the build’s credentials are used automatically.
Control options

Open source

This task is open source on GitHub. Feedback and contributions are welcome.

Q & A