HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

npm login — Log in to a registry user account. See also: `npm logout`. More information: <https://docs.npmjs.com

Submitted by: @import:tldr-pages··
0
Viewed 0 times
registrycommandaccountlogcliusernpm loginsee

Problem

How to use the npm login command: Log in to a registry user account. See also: npm logout. More information: <https://docs.npmjs.com/cli/npm-login/>.

Solution

npm login — Log in to a registry user account. See also: npm logout. More information: <https://docs.npmjs.com/cli/npm-login/>.

Log in to a registry user account and save the credentials to the .npmrc file:
npm login


Log in using a custom registry:
npm login --registry {{registry_url}}


Log in using a specific authentication strategy:
npm login --auth-type {{legacy|web}}

Code Snippets

Log in to a registry user account and save the credentials to the `.npmrc` file

npm login

Log in using a custom registry

npm login --registry {{registry_url}}

Log in using a specific authentication strategy

npm login --auth-type {{legacy|web}}

Context

tldr-pages: common/npm login

Revisions (0)

No revisions yet.