I have an artifact on ADO with published package @foo/bar
I followed the install instruction with
one user .npmrc containing links, usernames, base-64 encoded pat token generated by ADO "install package" documentation, filling in the requisite fields
; begin auth token //pkgs.dev.azure/[org name]/[project id]/_packaging/[artifact feed name]/npm/registry/:username=[username] //pkgs.dev.azure/[org name]/[project id]/_packaging/[artifact feed name]/npm/registry/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN] //pkgs.dev.azure/[org name]/[project id]/_packaging/[artifact feed name]/npm/registry/:email=[email] //pkgs.dev.azure/[org name]/[project id]/_packaging/[artifact feed name]/npm/:username=[username] //pkgs.dev.azure/[org name]/[project id]/_packaging/[artifact feed name]/npm/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN] //pkgs.dev.azure/[org name]/[project id]/_packaging/[artifact feed name]/npm/:email=[email] ; end auth token
one package - based .npmrc file containing the scope-prefaced registry
@foo:registry=... always-auth=true
I cloned project 'baz', cd'd into the directory and ran `npm install @foo/bar
Received 401 unauthorized when trying to install the package
I was expecting the package @foo/bar to be installed and listed in the package.json file
I tried:
- Adding a scope to the user-level .npmrc
- surrounding the base-64 auth token in quotes/brackets "[base-64-pat-token]"
- regenerating the pat token
- authenticating using `npm login --source @foo
- This resulted in infinite spinning with a masking of the project id on the cli due to auth policies preventing web-based access
- iterating on scope and registry.
- removed the scope altogether has the same result of 401
- logging in w/out --source resulted in the same as trying to login with --source when the source was included