npm-adduser.1 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. .TH "NPM\-ADDUSER" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-adduser\fR \- Add a registry user account
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-auth\-type=legacy]
  9. aliases: login, add\-user
  10. .fi
  11. .RE
  12. .P
  13. Note: This command is unaware of workspaces\.
  14. .SS Description
  15. .P
  16. Create or verify a user named \fB<username>\fP in the specified registry, and
  17. save the credentials to the \fB\|\.npmrc\fP file\. If no registry is specified,
  18. the default registry will be used (see npm help \fBconfig\fP)\.
  19. .P
  20. The username, password, and email are read in from prompts\.
  21. .P
  22. To reset your password, go to https://www\.npmjs\.com/forgot
  23. .P
  24. To change your email address, go to https://www\.npmjs\.com/email\-edit
  25. .P
  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,
  28. the username, password and email address must all match with
  29. your existing record\.
  30. .P
  31. \fBnpm login\fP is an alias to \fBadduser\fP and behaves exactly the same way\.
  32. .SS Configuration
  33. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  34. <!\-\- automatically generated, do not edit manually \-\->
  35. <!\-\- see lib/utils/config/definitions\.js \-\->
  36. .SS \fBregistry\fP
  37. .RS 0
  38. .IP \(bu 2
  39. Default: "https://registry\.npmjs\.org/"
  40. .IP \(bu 2
  41. Type: URL
  42. .RE
  43. .P
  44. The base URL of the npm registry\.
  45. <!\-\- automatically generated, do not edit manually \-\->
  46. <!\-\- see lib/utils/config/definitions\.js \-\->
  47. .SS \fBscope\fP
  48. .RS 0
  49. .IP \(bu 2
  50. Default: the scope of the current project, if any, or ""
  51. .IP \(bu 2
  52. Type: String
  53. .RE
  54. .P
  55. Associate an operation with a scope for a scoped registry\.
  56. .P
  57. Useful when logging in to or out of a private registry:
  58. .P
  59. .RS 2
  60. .nf
  61. # log in, linking the scope to the custom registry
  62. npm login \-\-scope=@mycorp \-\-registry=https://registry\.mycorp\.com
  63. # log out, removing the link and the auth token
  64. npm logout \-\-scope=@mycorp
  65. .fi
  66. .RE
  67. .P
  68. This will cause \fB@mycorp\fP to be mapped to the registry for future
  69. installation of packages specified according to the pattern
  70. \fB@mycorp/package\fP\|\.
  71. .P
  72. This will also cause \fBnpm init\fP to create a scoped package\.
  73. .P
  74. .RS 2
  75. .nf
  76. # accept all defaults, and create a package named "@foo/whatever",
  77. # instead of just named "whatever"
  78. npm init \-\-scope=@foo \-\-yes
  79. .fi
  80. .RE
  81. <!\-\- automatically generated, do not edit manually \-\->
  82. <!\-\- see lib/utils/config/definitions\.js \-\->
  83. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  84. .SS See Also
  85. .RS 0
  86. .IP \(bu 2
  87. npm help registry
  88. .IP \(bu 2
  89. npm help config
  90. .IP \(bu 2
  91. npm help npmrc
  92. .IP \(bu 2
  93. npm help owner
  94. .IP \(bu 2
  95. npm help whoami
  96. .IP \(bu 2
  97. npm help token
  98. .IP \(bu 2
  99. npm help profile
  100. .RE