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

87 lines
2.4 KiB
Groff
Raw Normal View History

.TH "NPM\-ADDUSER" "1" "May 2015" "" ""
.SH "NAME"
2014-09-25 05:41:07 +08:00
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
.P
.RS 2
2014-11-05 07:08:12 +08:00
.nf
npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-always\-auth]
.fi
2014-09-25 05:41:07 +08:00
.RE
.SH DESCRIPTION
.P
Create or verify a user named \fB<username>\fR in the specified registry, and
save the credentials to the \fB\|\.npmrc\fR file\. If no registry is specified,
the default registry will be used (see npm help 7 \fBnpm\-config\fR)\.
.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-25 05:41:07 +08:00
.P
\fBnpm login\fR is an alias to \fBadduser\fR and behaves exactly the same way\.
.SH CONFIGURATION
.SS registry
.P
Default: http://registry\.npmjs\.org/
.P
2014-09-25 05:41:07 +08:00
The base URL of the npm package registry\. If \fBscope\fR is also specified,
this registry will only be used for packages with that scope\. See npm help 7 \fBnpm\-scope\fR\|\.
.SS scope
.P
Default: none
.P
If specified, the user and login credentials given will be associated
with the specified scope\. See npm help 7 \fBnpm\-scope\fR\|\. You can use both at the same time,
e\.g\.
.P
.RS 2
2014-11-05 07:08:12 +08:00
.nf
2014-09-25 05:41:07 +08:00
npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco
2014-11-05 07:08:12 +08:00
.fi
2014-09-25 05:41:07 +08: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\.
2014-11-05 07:08:12 +08:00
.SS always\-auth
.P
Default: false
.P
If specified, save configuration indicating that all requests to the given
registry should include authorization information\. Useful for private
registries\. Can be used with \fB\-\-registry\fR and / or \fB\-\-scope\fR, e\.g\.
.P
.RS 2
.nf
npm adduser \-\-registry=http://private\-registry\.example\.com \-\-always\-auth
.fi
.RE
.P
This will ensure that all requests to that registry (including for tarballs)
include an authorization header\. See \fBalways\-auth\fR in npm help 7 \fBnpm\-config\fR for more
details on always\-auth\. Registry\-specific configuration of \fBalways\-auth\fR takes
2014-11-05 07:08:12 +08:00
precedence over any global configuration\.
2014-09-25 05:41:07 +08:00
.SH SEE ALSO
.RS 0
.IP \(bu 2
2014-09-17 06:38:50 +08:00
npm help 7 registry
2014-09-25 05:41:07 +08:00
.IP \(bu 2
npm help config
2014-09-25 05:41:07 +08:00
.IP \(bu 2
2014-09-17 06:38:50 +08:00
npm help 7 config
2014-09-25 05:41:07 +08:00
.IP \(bu 2
2014-09-17 06:38:50 +08:00
npm help 5 npmrc
2014-09-25 05:41:07 +08:00
.IP \(bu 2
npm help owner
2014-09-25 05:41:07 +08:00
.IP \(bu 2
npm help whoami
2014-09-25 05:41:07 +08:00
.RE