Skip to content

[Question]: npmAuthenticate seems to not add for org authentication #21090

Open
@pedrooct

Description

@pedrooct

Task name

npmAuthenticate@0

Task version

0.251.1

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Ubuntu 24.04

Question

So, when I use a service connection pointing to an external azure devops pkgs I receive the following npmrc:

//pkgs.dev.azure.com/***/_packaging/***/npm/registry/:username=***
//pkgs.dev.azure.com/***/_packaging/***/npm/registry/:_password=***
//pkgs.dev.azure.com/***/_packaging/***/npm/registry/:email=***
//pkgs.dev.azure.com/***/_packaging/***/npm/registry/:always-auth=true

However I believe it should also add the following lines: 

//pkgs.dev.azure.com/***/_packaging/***/npm/registry/:username=***
//pkgs.dev.azure.com/***/_packaging/***/npm/registry/:_password=***
//pkgs.dev.azure.com/***/_packaging/***/npm/registry/:email=***
//pkgs.dev.azure.com/***/_packaging/***/npm/registry/:always-auth=true
//pkgs.dev.azure.com/***/_packaging/***/npm/:username=***
//pkgs.dev.azure.com/***/_packaging/***/npm/:_password=***
//pkgs.dev.azure.com/***/_packaging/***/npm/:email=***
//pkgs.dev.azure.com/***/_packaging/***/npm/:always-auth=true

As this would auth the organization also

npm error code E401
npm error Incorrect or missing password.
npm error If you were trying to login, change your password, create an
npm error authentication token or enable two-factor authentication then
npm error that means you likely typed your password in incorrectly.
npm error Please try again, or recover your password at:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions