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