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