npm-token.1 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. .TH "NPM\-TOKEN" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-token\fR \- Manage your authentication tokens
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm token list [\-\-json|\-\-parseable]
  9. npm token create [\-\-read\-only] [\-\-cidr=1\.1\.1\.1/24,2\.2\.2\.2/16]
  10. npm token revoke <id|token>
  11. .fi
  12. .RE
  13. .P
  14. Note: This command is unaware of workspaces\.
  15. .SS Description
  16. .P
  17. This lets you list, create and revoke authentication tokens\.
  18. .RS 0
  19. .IP \(bu 2
  20. \fBnpm token list\fP:
  21. Shows a table of all active authentication tokens\. You can request
  22. this as JSON with \fB\-\-json\fP or tab\-separated values with \fB\-\-parseable\fP\|\.
  23. .RE
  24. .P
  25. .RS 2
  26. .nf
  27. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  28. | id | token | created | read\-only | CIDR whitelist |
  29. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  30. | 7f3134 | 1fa9ba… | 2017\-10\-02 | yes | |
  31. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  32. | c03241 | af7aef… | 2017\-10\-02 | no | 192\.168\.0\.1/24 |
  33. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  34. | e0cf92 | 3a436a… | 2017\-10\-02 | no | |
  35. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  36. | 63eb9d | 74ef35… | 2017\-09\-28 | no | |
  37. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  38. | 2daaa8 | cbad5f… | 2017\-09\-26 | no | |
  39. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  40. | 68c2fe | 127e51… | 2017\-09\-23 | no | |
  41. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  42. | 6334e1 | 1dadd1… | 2017\-09\-23 | no | |
  43. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  44. .fi
  45. .RE
  46. .RS 0
  47. .IP \(bu 2
  48. \fBnpm token create [\-\-read\-only] [\-\-cidr=<cidr\-ranges>]\fP:
  49. Create a new authentication token\. It can be \fB\-\-read\-only\fP, or accept
  50. a list of
  51. CIDR \fIhttps://en\.wikipedia\.org/wiki/Classless_Inter\-Domain_Routing\fR
  52. ranges with which to limit use of this token\. This will prompt you for
  53. your password, and, if you have two\-factor authentication enabled, an
  54. otp\.
  55. Currently, the cli can not generate automation tokens\. Please refer to
  56. the docs
  57. website \fIhttps://docs\.npmjs\.com/creating\-and\-viewing\-access\-tokens\fR
  58. for more information on generating automation tokens\.
  59. .RE
  60. .P
  61. .RS 2
  62. .nf
  63. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  64. | token | a73c9572\-f1b9\-8983\-983d\-ba3ac3cc913d |
  65. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  66. | cidr_whitelist | |
  67. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  68. | readonly | false |
  69. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  70. | created | 2017\-10\-02T07:52:24\.838Z |
  71. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  72. .fi
  73. .RE
  74. .RS 0
  75. .IP \(bu 2
  76. \fBnpm token revoke <token|id>\fP:
  77. Immediately removes an authentication token from the registry\. You
  78. will no longer be able to use it\. This can accept both complete
  79. tokens (such as those you get back from \fBnpm token create\fP, and those
  80. found in your \fB\|\.npmrc\fP), and ids as seen in the parseable or json
  81. output of \fBnpm token list\fP\|\. This will NOT accept the truncated token
  82. found in the normal \fBnpm token list\fP output\.
  83. .RE
  84. .SS Configuration
  85. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  86. <!\-\- automatically generated, do not edit manually \-\->
  87. <!\-\- see lib/utils/config/definitions\.js \-\->
  88. .SS \fBread\-only\fP
  89. .RS 0
  90. .IP \(bu 2
  91. Default: false
  92. .IP \(bu 2
  93. Type: Boolean
  94. .RE
  95. .P
  96. This is used to mark a token as unable to publish when configuring limited
  97. access tokens with the \fBnpm token create\fP command\.
  98. <!\-\- automatically generated, do not edit manually \-\->
  99. <!\-\- see lib/utils/config/definitions\.js \-\->
  100. .SS \fBcidr\fP
  101. .RS 0
  102. .IP \(bu 2
  103. Default: null
  104. .IP \(bu 2
  105. Type: null or String (can be set multiple times)
  106. .RE
  107. .P
  108. This is a list of CIDR address to be used when configuring limited access
  109. tokens with the \fBnpm token create\fP command\.
  110. <!\-\- automatically generated, do not edit manually \-\->
  111. <!\-\- see lib/utils/config/definitions\.js \-\->
  112. .SS \fBregistry\fP
  113. .RS 0
  114. .IP \(bu 2
  115. Default: "https://registry\.npmjs\.org/"
  116. .IP \(bu 2
  117. Type: URL
  118. .RE
  119. .P
  120. The base URL of the npm registry\.
  121. <!\-\- automatically generated, do not edit manually \-\->
  122. <!\-\- see lib/utils/config/definitions\.js \-\->
  123. .SS \fBotp\fP
  124. .RS 0
  125. .IP \(bu 2
  126. Default: null
  127. .IP \(bu 2
  128. Type: null or String
  129. .RE
  130. .P
  131. This is a one\-time password from a two\-factor authenticator\. It's needed
  132. when publishing or changing package permissions with \fBnpm access\fP\|\.
  133. .P
  134. If not set, and a registry response fails with a challenge for a one\-time
  135. password, npm will prompt on the command line for one\.
  136. <!\-\- automatically generated, do not edit manually \-\->
  137. <!\-\- see lib/utils/config/definitions\.js \-\->
  138. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  139. .SS See Also
  140. .RS 0
  141. .IP \(bu 2
  142. npm help adduser
  143. .IP \(bu 2
  144. npm help registry
  145. .IP \(bu 2
  146. npm help config
  147. .IP \(bu 2
  148. npm help npmrc
  149. .IP \(bu 2
  150. npm help owner
  151. .IP \(bu 2
  152. npm help whoami
  153. .IP \(bu 2
  154. npm help profile
  155. .RE