Skip to main content
Version: 11.x

pnpm whoami

新增于:v11.0.0

🌐 Added in: v11.0.0

打印与当前注册表凭据关联的用户名。

🌐 Print the username associated with the current registry credentials.

pnpm whoami [--registry <url>]

如果你未登录,该命令将以错误退出。请先使用 pnpm login 进行认证。

🌐 If you are not logged in, the command exits with an error. Use pnpm login to authenticate first.

选项

🌐 Options

--registry <url>

要检查的注册表。默认为配置的默认注册表。

🌐 The registry to check. Defaults to the configured default registry.