vp pm login
Authenticate with a package registry. Alias: vp pm adduser.
bash
vp pm login
vp pm login --scope @my-orgOptions
| Option | Description | Notes |
|---|---|---|
--registry <url> | Select the registry. | |
--scope <scope> | Scope for the login. |
Compatibility
- npm:
npm login. - pnpm: 11 or later:
pnpm login. Earlier versions usenpm loginas a fallback. - Yarn Classic:
yarn login. - Yarn Modern:
yarn npm login. - Bun: Fallback:
npm login.
| Option | npm | pnpm | Yarn Classic | Yarn Modern | Bun | Notes |
|---|---|---|---|---|---|---|
--registry <url> | Yes | Yes | No | No | Yes | Configure the registry in Yarn settings. |
--scope <scope> | Yes | Before 11 or 11.2 or later | No | Yes | Yes |
Authentication prompts and credential storage belong to the native command. pnpm login does not copy credentials to npm, so commands that still use npm may require a separate login. See whoami to check the selected account and logout to end authentication.
Native Options
For native options, see npm login, pnpm login, Yarn npm login, and Yarn Classic login. To pass these options through Vite+, see Native Arguments.