2

In my bunfig.toml file I have:

[install.scopes]
"@company" = {url = "https://company.pkgs.visualstudio.com/_packaging/Web/npm/registry", username = "company", password = "BASE_64_ENCODED_PAT"}

Unfortunately I get an error with SegmentationFault at 0

Does anyone know how to specifically authenticate with an Azure DevOps based package repository?

Jamie
  • 3,105
  • 1
  • 25
  • 35

1 Answers1

0

So I found the answer after a few hours of figuring out how HTTP auth works with Azure Artifacts.

tldr;

[install.scopes]
"@my-azure-scope" = { username = "USERNAME", password = "BASE_64_PAT", url = "REGISTRY_URL" }

How do I find these values?

In Azure DevOps, go to Artifacts > [ Select the feed you want to connect to ] > Connect to Feed > npm > Other.

Following the example above:

The REGISTRY_URL will start with https://pkgs.dev.azure.com or https://xxx.pkgs.visualstudio.com

The USERNAME is provided in the .npmrc snippet

The BASE_64_PAT is a base64 encoded PAT token generated in DevOps

Jamie
  • 3,105
  • 1
  • 25
  • 35