npm-profile
更改注册表配置文件的设置概要
npm profile get [--json|--parseable] [<property>]npm profile set [--json|--parseable] <property> <value>npm profile set passwordnpm profile enable-2fa [auth-and-writes|auth-only]npm profile disable-2fa
描述
更改注册表上的个人资料信息。 如果你使用的是非 npmjs 注册表,则此选项不可用。
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>: 设置配置文件属性的值。 你可以通过这种方式设置以下属性: 电子邮件、全名、主页、freenode、twitter、githubnpm 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,并且在发布模块、设置latestdist-tag 或通过npm access和npm owner更改访问权限时也需要 OTP。
npm profile disable-2fa: 禁用双重身份验证。
详情
所有 npm profile 子命令都接受 --json 和 --parseable 并将根据这些调整其输出。 其中一些命令在非 npmjs.com 注册表上可能不可用。
也可以看看
npm 中文网 - 粤ICP备13048890号