npm8中文文档
更改注册表上的个人资料信息。请注意,此命令取决于注册表实现,因此第三方注册表可能不支持此接口。
npm profile get [<property>]
:显示您的个人资料的所有属性,或一个或多个特定属性。看起来像:+-----------------+---------------------------+
| name | example |
+-----------------+---------------------------+
| email | me@example.com (verified) |
+-----------------+---------------------------+
| two factor auth | auth-and-writes |
+-----------------+---------------------------+
| fullname | Example User |
+-----------------+---------------------------+
| homepage | |
+-----------------+---------------------------+
| freenode | |
+-----------------+---------------------------+
| twitter | |
+-----------------+---------------------------+
| github | |
+-----------------+---------------------------+
| created | 2015-02-26T01:38:35.892Z |
+-----------------+---------------------------+
| updated | 2017-10-02T21:29:45.922Z |
+-----------------+---------------------------+
npm profile set <property> <value>
:设置配置文件属性的值。您可以通过这种方式设置以下属性:email、fullname、homepage、freenode、twitter、github
npm profile set password
:更改您的密码。这是交互式的,系统会提示您输入当前密码和新密码。如果您启用了双因素身份验证,系统还会提示您输入 OTP。
npm profile enable-2fa [auth-and-writes|auth-only]
:启用双重身份验证。默认为 auth-and-writes
模式。模式是:
auth-only
:登录或更改帐户身份验证时需要 OTP。网站和命令行都需要 OTP。auth-and-writes
:auth-only
始终需要 OTP,并且在发布模块、设置 latest
dist-tag 或通过 npm access
和 npm owner
更改访问权限时也需要 OTP。npm profile disable-2fa
:禁用双重身份验证。