Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>YARNRC Authenticate
YARNRC Authenticate

YARNRC Authenticate

Medhat Fawzy

|
1 install
| (0) | Free
Minimal Azure Pipelines custom task to authenticate .yarnrc.yml registries.
Get it free

Yarnrc Authenticate Task (Minimal)

Minimal custom Azure DevOps task inspired by NpmAuthenticateV0, but targeting .yarnrc.yml.

What it does

  • Reads a .yarnrc.yml file from workingFile.
  • Reads service connection credentials from customEndpoint (comma-separated IDs).
  • Matches service-connection registry URLs to npmScopes.*.npmRegistryServer.
  • Writes auth into:
    • npmScopes[scope].npmAuthToken or npmAuthIdent
    • npmRegistries[registry].npmAuthToken or npmAuthIdent
  • Sets npmAlwaysAuth: true for matched entries.

Structure

  • Tasks/YarnrcAuthenticate/task.json
  • Tasks/YarnrcAuthenticate/src/yarnrcauth.ts
  • Tasks/YarnrcAuthenticate/dist/yarnrcauth.js (generated)
  • package.json
  • tsconfig.json

Install deps

yarn install
yarn build

Use in pipeline (after packaging and publishing the custom task)

- task: YarnrcAuthenticate@1
  inputs:
    workingFile: $(Build.SourcesDirectory)/.yarnrc.yml
    customEndpoint: your-service-connection-id

Notes

  • workingFile must be .yarnrc.yml or .yarnrc.yaml.
  • If no customEndpoint is provided, task exits with warning and no file changes.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft