Include legacy authentication option for npm login #261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since npm v9 there is an
--auth-type
flag on thenpm login
command. The default isweb
which prompts you to pressEnter
to open the web page of the registry you want to authenticate with. This works great if you want to authenticate with Artifactory using keycloak and your own account but does not work with Artifactory service accounts as they can't be used to login to the UI.If you want to use an Artifactory service account to authenticate, you need to
npm login --auth-type=legacy
which will prompt you for a username and password.