pnpm login
Псевдоніми: adduser
Пройти автентифікацію в реєстрі npm.
pnpm login [--registry <url>] [--scope <scope>]
Підтримує веб-вхід за допомогою QR-коду, а також класичну автентифікацію за імʼям користувача/паролем.
Web-based login does not require an interactive terminal. Without a TTY, pnpm login prints the authentication URL (skipping the QR code and the prompt to open the URL in a browser) and polls the registry until the browser approval completes. Лише класичний вхід за допомогою імені користувача та пароля як і раніше завершується помилкою ERR_PNPM_LOGIN_NON_INTERACTIVE в неінтерактивному терміналі.
Since v12.13.0, web-based login prints the registry's npm-notice messages before the authentication URL. Some registries use them to show a verification code that you confirm in the browser.
The granted token is written to
<pnpm config>/auth.ini. Since v12.1.0,
--scope also routes that scope to the registry under the global
registries setting in config.yaml.
From v12.1.0 to v12.15.0, the token was written to the
_auth setting in the global config.yaml. There, an
unscoped token also made its registry the default. Since v12.16.0 a login
removes the token it replaces from _auth.
Параметри#
--registry <url>#
Реєстр для автентифікації. Стандартним значенням є типовий налаштований реєстр.
--scope <scope>#
Повʼязати облікові дані з вказаною областю дії. Буде використано реєстр для цієї області дії.
Since v12.1.0, a scope setting in a project's
pnpm-workspace.yaml is ignored with a warning. A repository must not be able
to choose the machine-wide route a later login writes. Pass --scope, set
PNPM_CONFIG_SCOPE, or set the machine's default with:
pnpm config set --global scope @acme