yarn npm login — Yarn CLI reference
Store credentials for an npm registry
Docs/Reference/CLI/npm/login
yarn npm login
Store credentials for an npm registry
yarn npm login
This command authenticates with a registry and stores the generated token in the home configuration file. It never writes credentials to the project configuration.
Use -s,--scope to authenticate against the registry configured for a scope.
Use --publish to authenticate against the registry used for publishing.
Authenticate with the registry configured for this scope
Authenticate with the publish registry
Enable or disable web-based login
Store credentials with npmAlwaysAuth enabled
Examples#
Login to the default registry
yarn npm login
Login to the registry linked to the @my-scope registry
yarn npm login --scope my-scope
Login to the publish registry for the current package
yarn npm login --publish