mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-23 03:51:29 +00:00
23 lines
515 B
Plaintext
23 lines
515 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# npm login
|
|
|
|
> Login to a registry user account.
|
|
> See also: `npm logout` for logging out.
|
|
> More information: <https://docs.npmjs.com/cli/commands/npm-login>.
|
|
|
|
- Login to a registry user account and save the credentials to the `.npmrc` file:
|
|
|
|
`npm login`
|
|
|
|
- Login using a custom registry:
|
|
|
|
`npm login --registry={{registry_url}}`
|
|
|
|
- Login using a specific authentication strategy:
|
|
|
|
`npm login --auth-type={{legacy|web}}`
|