本文参考了NPM中文文档写做而成的html
更改注册表配置文件上的设置node
npm profile get [--json|--parseable][<property>] npm profile set [--json|--parseable] <property> <value> npm profile set password npm profile enable-2fa [auth-and-writes|auth-only] npm profile disable-2fa
在注册表上更改您的配置文件信息。若是您使用的是非 npmjs 注册表,则此功能不可用。git
npm profile get [<property>]:显示我的资料的全部属性,或一个或多个特定属性。看起来像:github
+-----------------+---------------------------+ | 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 enable-2fa [auth-and-writes|auth-only]
:启用双重身份验证。默认为 auth-and-writesmode。模式有:npm
全部 npm profile
子命令都会接受--json
并--parseable
会根据这些命令调整其输出。json
其中一些命令可能在非 npmjs.com 注册表上不可用。api
本文参考NPM中文文档网站