Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
make this man page more manly
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed May 14, 2010
1 parent 83b9faa commit 46e7318
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
22 changes: 14 additions & 8 deletions doc/adduser.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,26 @@ npm-adduser(1) -- Add a registry user account

## SYNOPSIS

npm adduser bob password bob@email.com
npm adduser <username> <password> <email>

## DESCRIPTION

Create a user named "bob" in the npm registry, and save the credentials to the
`.npmrc` file. Note that this leaves the password in your `.bash_history`, and
it is currently stored in the clear in the config file. So, don't use a
password you care too much about.
Create a user named `<username>` in the npm registry, and save the
credentials to the `.npmrc` file. Note that this leaves the password
in your `.bash_history`, and it is currently stored in the clear in
the config file. So, don't use a password you care too much about.

For now, if you somehow break your `.npmrc` file, and have forgotten your
password, you're boned. [Email isaacs](mailto:i@izs.me) and he'll delete the
password, you're boned. Send an email to i@izs.me and I'll delete the
record from the registry so that you can re-add it.

If you break your `.npmrc` file, but you remember your password, you can put your
user auth back by using the `base64` program like so:
If you break your `.npmrc` file, but you remember your password, you
can put your user auth back by using the `base64` program like so:

npm config set auth $( echo user:pass | base64 )

Install base64 using whichever method you normally use to put programs on
your computer. (apt-get, homebrew, macports, yum, or just download the
code and build it yourself.)

Or bug me to to remove your account, and then recreate it.
23 changes: 16 additions & 7 deletions man/adduser.1
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,24 @@
.SH "SYNOPSIS"
.
.nf
npm adduser bob password bob@email.com
npm adduser <username> <password> <email>
.
.fi
.
.SH "DESCRIPTION"
Create a user named "bob" in the npm registry, and save the credentials to the\fB.npmrc\fR file. Note that this leaves the password in your \fB.bash_history\fR, and
it is currently stored in the clear in the config file. So, don't use a
password you care too much about.
Create a user named \fB<username>\fR in the npm registry, and save the
credentials to the \fB.npmrc\fR file. Note that this leaves the password
in your \fB.bash_history\fR, and it is currently stored in the clear in
the config file. So, don't use a password you care too much about.
.
.P
For now, if you somehow break your \fB.npmrc\fR file, and have forgotten your
password, you're boned. \fIEmail isaacs\fR and he'll delete the
password, you're boned. Send an email to i@izs.me and I'll delete the
record from the registry so that you can re\-add it.
.
.P
If you break your \fB.npmrc\fR file, but you remember your password, you can put your
user auth back by using the \fBbase64\fR program like so:
If you break your \fB.npmrc\fR file, but you remember your password, you
can put your user auth back by using the \fBbase64\fR program like so:
.
.IP "" 4
.
Expand All @@ -35,3 +36,11 @@ npm config set auth $( echo user:pass | base64 )
.fi
.
.IP "" 0
.
.P
Install base64 using whichever method you normally use to put programs on
your computer. (apt\-get, homebrew, macports, yum, or just download the
code and build it yourself.)
.
.P
Or bug me to to remove your account, and then recreate it.

0 comments on commit 46e7318

Please sign in to comment.