Skip to content

Commit 30a29b4

Browse files
committed
doc (publish): remove deprecated --token option from man, add info about env variables
1 parent 6efd504 commit 30a29b4

File tree

4 files changed

+9
-46
lines changed

4 files changed

+9
-46
lines changed

src/doc/man/cargo-publish.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ following steps:
2828
and may timeout. In that case, you will need to check for completion
2929
manually. This timeout does not affect the upload.
3030

31-
This command requires you to be authenticated with either the `--token` option
32-
or using {{man "cargo-login" 1}}.
31+
This command requires you to be authenticated using {{man "cargo-login" 1}}
32+
or [environment variables](../reference/environment-variables.html).
3333

3434
See [the reference](../reference/publishing.html) for more details about
3535
packaging and publishing.
@@ -44,8 +44,6 @@ packaging and publishing.
4444
Perform all checks without uploading.
4545
{{/option}}
4646

47-
{{> options-token }}
48-
4947
{{#option "`--no-verify`" }}
5048
Don't verify the contents by building them.
5149
{{/option}}

src/doc/man/generated_txt/cargo-publish.txt

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ DESCRIPTION
2525
and may timeout. In that case, you will need to check for completion
2626
manually. This timeout does not affect the upload.
2727

28-
This command requires you to be authenticated with either the --token
29-
option or using cargo-login(1).
28+
This command requires you to be authenticated using cargo-login(1) or
29+
environment variables
30+
<https://doc.rust-lang.org/cargo/reference/environment-variables.html>.
3031

3132
See the reference
3233
<https://doc.rust-lang.org/cargo/reference/publishing.html> for more
@@ -37,18 +38,6 @@ OPTIONS
3738
--dry-run
3839
Perform all checks without uploading.
3940

40-
--token token
41-
API token to use when authenticating. This overrides the token
42-
stored in the credentials file (which is created by cargo-login(1)).
43-
44-
Cargo config <https://doc.rust-lang.org/cargo/reference/config.html>
45-
environment variables can be used to override the tokens stored in
46-
the credentials file. The token for crates.io may be specified with
47-
the CARGO_REGISTRY_TOKEN environment variable. Tokens for other
48-
registries may be specified with environment variables of the form
49-
CARGO_REGISTRIES_NAME_TOKEN where NAME is the name of the registry
50-
in all capital letters.
51-
5241
--no-verify
5342
Don’t verify the contents by building them.
5443

src/doc/src/commands/cargo-publish.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ following steps:
2424
and may timeout. In that case, you will need to check for completion
2525
manually. This timeout does not affect the upload.
2626

27-
This command requires you to be authenticated with either the `--token` option
28-
or using [cargo-login(1)](cargo-login.html).
27+
This command requires you to be authenticated using [cargo-login(1)](cargo-login.html)
28+
or [environment variables](../reference/environment-variables.html).
2929

3030
See [the reference](../reference/publishing.html) for more details about
3131
packaging and publishing.
@@ -40,17 +40,6 @@ packaging and publishing.
4040
<dd class="option-desc">Perform all checks without uploading.</dd>
4141

4242

43-
<dt class="option-term" id="option-cargo-publish---token"><a class="option-anchor" href="#option-cargo-publish---token"></a><code>--token</code> <em>token</em></dt>
44-
<dd class="option-desc">API token to use when authenticating. This overrides the token stored in
45-
the credentials file (which is created by <a href="cargo-login.html">cargo-login(1)</a>).</p>
46-
<p><a href="../reference/config.html">Cargo config</a> environment variables can be
47-
used to override the tokens stored in the credentials file. The token for
48-
crates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment
49-
variable. Tokens for other registries may be specified with environment
50-
variables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name
51-
of the registry in all capital letters.</dd>
52-
53-
5443
<dt class="option-term" id="option-cargo-publish---no-verify"><a class="option-anchor" href="#option-cargo-publish---no-verify"></a><code>--no-verify</code></dt>
5544
<dd class="option-desc">Don’t verify the contents by building them.</dd>
5645

src/etc/man/cargo-publish.1

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ and may timeout. In that case, you will need to check for completion
3737
manually. This timeout does not affect the upload.
3838
.RE
3939
.sp
40-
This command requires you to be authenticated with either the \fB\-\-token\fR option
41-
or using \fBcargo\-login\fR(1).
40+
This command requires you to be authenticated using \fBcargo\-login\fR(1)
41+
or \fIenvironment variables\fR <https://doc.rust\-lang.org/cargo/reference/environment\-variables.html>\&.
4242
.sp
4343
See \fIthe reference\fR <https://doc.rust\-lang.org/cargo/reference/publishing.html> for more details about
4444
packaging and publishing.
@@ -50,19 +50,6 @@ packaging and publishing.
5050
Perform all checks without uploading.
5151
.RE
5252
.sp
53-
\fB\-\-token\fR \fItoken\fR
54-
.RS 4
55-
API token to use when authenticating. This overrides the token stored in
56-
the credentials file (which is created by \fBcargo\-login\fR(1)).
57-
.sp
58-
\fICargo config\fR <https://doc.rust\-lang.org/cargo/reference/config.html> environment variables can be
59-
used to override the tokens stored in the credentials file. The token for
60-
crates.io may be specified with the \fBCARGO_REGISTRY_TOKEN\fR environment
61-
variable. Tokens for other registries may be specified with environment
62-
variables of the form \fBCARGO_REGISTRIES_NAME_TOKEN\fR where \fBNAME\fR is the name
63-
of the registry in all capital letters.
64-
.RE
65-
.sp
6653
\fB\-\-no\-verify\fR
6754
.RS 4
6855
Don\[cq]t verify the contents by building them.

0 commit comments

Comments
 (0)