npm profile

🌙
手机阅读
本文目录结构

npm profile 功能

更改注册表配置文件上的设置

npm profile 使用

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

npm profile 说明

在注册表上更改您的配置文件信息。如果您使用的是非 npmjs 注册表,则此功能不可用。

npm profile get []:显示个人资料的所有属性,或一个或多个特定属性。看起来像:

+-----------------+---------------------------+
| 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,github

  • npm profile set password: 更改您的密码。这是交互式的,系统将提示您输入当前密码和新密码。如果启用了双重身份验证,系统也会提示您输入 OTP。

  • npm profile enable-2fa [auth-and-writes|auth-only]:启用双重身份验证。默认为 auth-and-writesmode。模式有:

    • auth-only:登录或更改帐户的身份验证时要求输入 OTP。网站和命令行上都将需要 OTP。
    • auth-and-writes:始终需要 OTP 进行 auth-only,并且在发布模块,设置 latestdist-tag 或通过 npm access 和更改访问时也需要一个 OTP npm owner。
  • npm profile disable-2fa:禁用两因素身份验证。

详细说明

所有 npm profile 子命令都会接受--json--parseable 会根据这些命令调整其输出。

其中一些命令可能在非 npmjs.com 注册表上不可用。

AXIHE / 精选资源

浏览全部教程

面试题

学习网站

前端培训
自己甄别

前端书籍

关于朱安邦

我叫 朱安邦,阿西河的站长,在杭州。

以前是一名平面设计师,后来开始接接触前端开发,主要研究前端技术中的JS方向。

业余时间我喜欢分享和交流自己的技术,欢迎大家关注我的 Bilibili

关注我: Github / 知乎

于2021年离开前端领域,目前重心放在研究区块链上面了

我叫朱安邦,阿西河的站长

目前在杭州从事区块链周边的开发工作,机械专业,以前从事平面设计工作。

2014年底脱产在老家自学6个月的前端技术,自学期间几乎从未出过家门,最终找到了满意的前端工作。更多>

于2021年离开前端领域,目前从事区块链方面工作了