选择命令行版本:
See Details
目录
概要
¥Synopsis
npm whoami
注意:此命令对工作区无感知。
¥Note: This command is unaware of workspaces.
描述
¥Description
显示当前登录用户的 npm 用户名。
¥Display the npm username of the currently logged-in user.
如果登录到提供基于令牌的身份验证的注册表,则连接到 /-/whoami
注册表端点以查找与令牌关联的用户名,并打印到标准输出。
¥If logged into a registry that provides token-based authentication, then connect to the /-/whoami
registry endpoint to find the username associated with the token, and print to standard output.
如果登录到使用基本身份验证的注册表,则只需打印身份验证字符串的 username
部分。
¥If logged into a registry that uses Basic Auth, then simply print the username
portion of the authentication string.
配置
¥Configuration
registry
-
默认值:"https://registry.npmjs.org/"
¥Default: "https://registry.npmjs.org/"
-
类型:URL
¥Type: URL
npm 注册表的基本 URL。
¥The base URL of the npm registry.
也可以看看
¥See Also
npm 中文网 - 粤ICP备13048890号