1NPM-ADDUSER(1)                                                  NPM-ADDUSER(1)
2
3
4
5section: cli−commands title: npm−adduser
6

NAME

8       npm-adduser - Add a registry user account
9
10   Synopsis
11         npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]
12
13         aliases: login, add-user
14
15   Description
16       Create or verify a user named <username> in the specified registry, and
17       save the credentials to the .npmrc file. If no registry  is  specified,
18       the default registry will be used (see npm help config).
19
20       The username, password, and email are read in from prompts.
21
22       To reset your password, go to https://www.npmjs.com/forgot
23
24       To change your email address, go to https://www.npmjs.com/email-edit
25
26       You  may  use this command multiple times with the same user account to
27       authorize on a new machine.  When authenticating on a new machine,  the
28       username,  password and email address must all match with your existing
29       record.
30
31       npm login is an alias to adduser and behaves exactly the same way.
32
33   Configuration
34   registry
35       Default: https://registry.npmjs.org/
36
37       The base URL of the npm package registry. If scope is  also  specified,
38       this  registry  will  only  be used for packages with that scope. scope
39       defaults to the scope of the project directory you're currently in,  if
40       any. See npm help scope.
41
42   scope
43       Default: none
44
45       If  specified,  the user and login credentials given will be associated
46       with the specified scope. See npm help scope. You can use both  at  the
47       same time, e.g.
48
49             npm adduser --registry=http://myregistry.example.com --scope=@myco
50
51       This will set a registry for the given scope and login or create a user
52       for that registry at the same time.
53
54   always-auth
55       Default: false
56
57       If specified, save configuration indicating that all  requests  to  the
58       given  registry  should  include  authorization information. Useful for
59       private registries. Can be used with --registry and / or --scope, e.g.
60
61             npm adduser --registry=http://private-registry.example.com --always-auth
62
63       This will ensure that all requests to that registry (including for tar‐
64       balls)  include  an authorization header. This setting may be necessary
65       for use with private registries where metadata and package tarballs are
66       stored  on  hosts with different hostnames. See always-auth in npm help
67       config for more details on always-auth. Registry-specific configuration
68       of always-auth takes precedence over any global configuration.
69
70   auth-type
71       · Default: 'legacy'
72
73       · Type: 'legacy', 'sso', 'saml', 'oauth'
74
75
76       What  authentication  strategy to use with adduser/login. Some npm reg‐
77       istries (for example, npmE) might support alternative  auth  strategies
78       besides classic username/password entry in legacy npm.
79
80   See Also
81       · npm help registry
82
83       · npm help config
84
85       · npm help npmrc
86
87       · npm help owner
88
89       · npm help whoami
90
91
92
93
94                                  March 2020                    NPM-ADDUSER(1)
Impressum