Skip to content

AzureDevops Authentication #425

@beakertron

Description

@beakertron

Are there any known issues authenticating to npm feeds hosted in azure devops artifacts.

I've followed the guide here: https://docs.unity3d.com/6000.1/Documentation/Manual/upm-config-scoped.html#configbasic

I've got the basic token, all setup in the upmconfig.toml file:

[npmAuth."https://pkgs.dev.azure.com/org/_packaging/feed/npm/registry/"]
_auth = "pattoken"
email = "email"
alwaysAuth = true

I have .npmrc and confirm I can install packages fine.

I have confirmed the token works in postman, I can see the package just fine

Here is the verbose output from the cli..

openupm add packagename --verbose --registry https://pkgs.dev.azure.com/org/_packaging/feed/npm/registry/


https://pkgs.dev.azure.com/org/_packaging/feed/npm/registry/packagename
Headers: { 'user-agent': '[email protected]/[email protected]+x64 (linux)' }
verb Fetching a packument failed.
verb HttpErrorAuthUnknown: Unable to authenticate, need: Bearer authorization_uri=https://login.windows.net/guid, Basic realm="https://pkgsprodcus1.pkgs.visualstudio.com/", TFS-Federated
https://packages.unity.com/packagename
Headers: { 'user-agent': '[email protected]/[email protected]+x64 (linux)' }
ERR! The registry at "https://pkgs.dev.azure.com/org/_packaging/feed/npm/registry" refused your request because you are not authenticated.
notice Use "openupm login" to authenticate with the registry.

Please note I added some custom logging to the cli javascript to try trace if it was even setting the basic auth header, and it seems not.. for example when getRegistryPackumentUsing is called its making requests to npm rgistry fetch json without providing any opts.. so I can't see how the auth info would ever work?

openupm login also fails with a similar error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions