nodejs/deps/npm/man/man1/npm-adduser.1

83 lines
2.2 KiB
Groff
Raw Normal View History

.TH "NPM\-ADDUSER" "1" "May 2021" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SS Synopsis
2014-09-24 14:41:07 -07:00
.P
.RS 2
2014-11-04 15:08:12 -08:00
.nf
npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-auth\-type=legacy]
aliases: login, add\-user
2014-11-04 15:08:12 -08:00
.fi
2014-09-24 14:41:07 -07:00
.RE
.P
Note: This command is unaware of workspaces\.
.SS Description
2014-09-24 14:41:07 -07:00
.P
Create or verify a user named \fB<username>\fP in the specified registry, and
save the credentials to the \fB\|\.npmrc\fP file\. If no registry is specified,
the default registry will be used (see npm help \fBconfig\fP)\.
.P
The username, password, and email are read in from prompts\.
.P
To reset your password, go to https://www\.npmjs\.com/forgot
.P
To change your email address, go to https://www\.npmjs\.com/email\-edit
.P
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\.
2014-09-24 14:41:07 -07:00
.P
\fBnpm login\fP is an alias to \fBadduser\fP and behaves exactly the same way\.
.SS Configuration
2014-09-24 14:41:07 -07:00
.SS registry
.P
Default: https://registry\.npmjs\.org/
.P
The base URL of the npm package registry\. If \fBscope\fP is also specified,
this registry will only be used for packages with that scope\. \fBscope\fP defaults
to the scope of the project directory you're currently in, if any\. See npm help \fBscope\fP\|\.
2014-09-24 14:41:07 -07:00
.SS scope
.P
Default: none
.P
If specified, the user and login credentials given will be associated
with the specified scope\. See npm help \fBscope\fP\|\. You can use both at the same time,
2014-09-24 14:41:07 -07:00
e\.g\.
.P
.RS 2
2014-11-04 15:08:12 -08:00
.nf
npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco
2014-11-04 15:08:12 -08:00
.fi
2014-09-24 14:41:07 -07:00
.RE
.P
This will set a registry for the given scope and login or create a user for
that registry at the same time\.
.SS auth\-type
.RS 0
.IP \(bu 2
Default: \fB\|'legacy'\fP
.IP \(bu 2
Type: \fB\|'legacy'\fP, \fB\|'sso'\fP, \fB\|'saml'\fP, \fB\|'oauth'\fP
.RE
.P
What authentication strategy to use with \fBadduser\fP/\fBlogin\fP\|\. Some npm registries
(for example, npmE) might support alternative auth strategies besides classic
username/password entry in legacy npm\.
.SS See Also
2014-09-24 14:41:07 -07:00
.RS 0
.IP \(bu 2
npm help registry
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help config
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help npmrc
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help owner
2014-09-24 14:41:07 -07:00
.IP \(bu 2
npm help whoami
2014-09-24 14:41:07 -07:00
.RE