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.

#--scope, -sboolean

Authenticate with the registry configured for this scope

#--publishboolean

Authenticate with the publish registry

#--web-loginboolean

Enable or disable web-based login

#--always-authboolean

Store credentials with npmAlwaysAuth enabled