Add a registry user account

npm adduser [–registry=url] [–scope=@orgname] [–always-auth] [–auth-type=legacy]

aliases: login, add-user

Create or verify a user named in the specified registry, and save the credentials to the .npmrc file. If no registry is specified, the default registry will be used (see npm-config).

The username, password, and email are read in from prompts.

To reset your password, go to https://www.npmjs.com/forgot

To change your email address, go to https://www.npmjs.com/email-edit

You may use this command multiple times with the same user account to authorize on a new machine. When authenticating on a new machine, the username, password and email address must all match with your existing record.

npm login is an alias to adduser and behaves exactly the same way.
Configuration
registry

Default: https://registry.npmjs.org/

The base URL of the npm package registry. If scope is also specified, this registry will only be used for packages with that scope. scope defaults to the scope of the project directory you’re currently in, if any. See npm-scope.
scope

Default: none

If specified, the user and login credentials given will be associated with the specified scope. See npm-scope. You can use both at the same time, e.g.

npm adduser --registry=http://myregistry.example.com --scope=@myco

This will set a registry for the given scope and login or create a user for that registry at the same time.
always-auth

Default: false

If specified, save configuration indicating that all requests to the given registry should include authorization information. Useful for private registries. Can be used with --registry and / or --scope, e.g.

npm adduser --registry=http://private-registry.example.com --always-auth

This will ensure that all requests to that registry (including for tarballs) include an authorization header. This setting may be necessary for use with private registries where metadata and package tarballs are stored on hosts with different hostnames. See always-auth in npm-config for more details on always-auth. Registry-specific configuration of always-auth takes precedence over any global configuration.
auth-type

Default: 'legacy'
Type: 'legacy', 'sso', 'saml', 'oauth'

What authentication strategy to use with adduser/login. Some npm registries (for example, npmE) might support alternative auth strategies besides classic username/password entry in legacy npm.

npm-adduser相关推荐

  1. npm adduser 和 npm publish 的踩坑

    一.npm adduser的踩坑 1.先注册 - 注册官网:https://www.npmjs.com/ - 注意,账号接收小写英文字母[a-z]+下划线[_],但不接受大写英文字母 - 填写邮箱:注 ...

  2. npm publish 、 npm adduser 提示 403 的问题

    0. 查看使用的源:npm config get registry 1. 如果使用的不是官方的源,切换:npm config set registry https://registry.npmjs.o ...

  3. npm adduser的使用方法

    npm adduser 功能 添加注册表用户账户 npm adduser使用 npm adduser [--registry=url] [--scope=@orgname] [--always-aut ...

  4. npm adduser报500

    npm登录500的问题 npm登录 登录过程 npm adduser username: xxx, password: 你的登录密码 Email: 你的邮箱 这些输入之后一直处于一个登录状态,登录好长 ...

  5. centos 系统使用verdaccio搭建npm私库

    .安装nodejs yum install -y nodejs 2.安装verdaccio npm install -g verdaccio --unsafe-perm 3.配置 a.修改配置文件 c ...

  6. npm 常用命令详解

    本文以Windows平台上做测试,以gulp为示例做教程,出自作者白树,转载请声明! 目录 npm是什么 npm install 安装模块 npm uninstall 卸载模块 npm update ...

  7. 登录账号 npm_自定义npm 及问题整理

    由于在项目中 经常自己在一个项目中打包依赖,另一个项目中需要引用自己打包的依赖,所以需要自己提交一个npm 可安装的包,以免CV大法(粘贴复制) 以下是步骤 在npm 官网上自己注册一个账号 [注册地 ...

  8. 安装npm_前端开发:node.js的node包管理器npm安装以及使用

    在前端开发过程中,node.js进行包管理的时候会使用npm管理器来操作.npm(node package manager)包管理器,主要是用于第三方模块的下载.安装和管理,它具有强大的第三方资源,重 ...

  9. 使用verdaccio 搭建npm私有仓库

    使用verdaccio 搭建npm私有仓库 1. 为什么要搭建私有的npm仓库?     随着公司的业务越来越复杂,项目迭代速度也越来越快,那么项目间的常用的业务代码共享变得非常之有必要.但是对于公司 ...

  10. 发布一个持续集成的npm包并加上装逼小icon

    前言 随着入坑时间的增长,很多小伙伴在使用第三方轮子时不满足于下载xxx.js,script标签引入xxx.js,然后使用轮子的原始方式.想要高大上一点,于是小伙伴们跟npm邂逅了.后来有的小伙伴又想 ...

最新文章

  1. 谭浩强《C++程序设计》学习
  2. python 2x与python 3x是否兼容_使.next()与Python2和3兼容
  3. 网页中的宽高度(网页视口宽高度,网页滚动宽高度,网页宽高度........)
  4. nfs linux系统服务,Linux系统服务搭建之NFS
  5. ldap radius_在LDAP上使用RADIUS的好处
  6. win11如何创建访客账户 windows11创建访客账户的设置方法
  7. Ubuntu21.04 查看 GNOME 版本
  8. 关于ipcam的UPnP或NAT的知识
  9. 拓端tecdat|Python实现谱聚类Spectral Clustering算法和改变簇数结果可视化比较
  10. 产品选型“神器” TIA Selection Tools 之选择 S7-1500T 全程详解
  11. 【Python】基于Python的百度迁徙5——实时拥堵与拥堵指数(附代码)
  12. 史上最健康的养胃时间表
  13. 缓存路由关联的两个生命周期activated和deactivated
  14. 最近ChatGPT封号太严重了,这里是解封攻略步骤(建议收藏)
  15. 在linux下使用rpm命令安装软件
  16. HTML:超文本标记语言
  17. Python 爬取QQ飞车手游赛道 or 宠物 图片
  18. 我一结婚到婆家,婆家全家人就自动不做饭了,啥都等我做
  19. 【c51】LCD1602__num++显示 (超详细)
  20. 新浪财经新闻爬取并进行舆情分析

热门文章

  1. 一个程序员的水平能差到什么程度?尼玛,都是人才呀...
  2. python时间差计算器时分秒_Python实现计算两个时间之间相差天数的方法
  3. 富爸爸——富人的阴谋
  4. 实战:CSI卷管理-2022.3.2
  5. 关于中国央行法定数字货币,你可能不知道的7件事
  6. RocketMq消息丢失问题解决
  7. box-shadow盒子阴影几种用法
  8. PS纯黑文字不纯黑,模糊?看这里
  9. 解决win11系统激活office一直转圈白屏
  10. 打开chrome报错误代码:STATUS_INVALID_IMAGE_HASH解决方案