Skip to content

Commit 0a3f2b4

Browse files
committed
Auto merge of #10458 - Eh2406:console-history, r=ehuss
Don't recommend leaking tokens into the console history Passing a secret on the command line leeks it into the history witch is available to other applications on the same system. Removing the functionality is a braking change, a big ask. But it is not hard to change the docs to not recommend using `cargo login` that way. cc: - https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/If.20RFC.203231.20Private.20tokens.20on.20the.20command.20line - rust-lang/rfcs#3231 (comment)
2 parents a6c7172 + 3e71691 commit 0a3f2b4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/doc/src/reference/publishing.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ limit to the number of versions which can be published, however.
1313
First things first, you’ll need an account on [crates.io] to acquire
1414
an API token. To do so, [visit the home page][crates.io] and log in via a GitHub
1515
account (required for now). After this, visit your [Account
16-
Settings](https://crates.io/me) page and run the [`cargo login`] command
17-
specified.
16+
Settings](https://crates.io/me) page and run the [`cargo login`] command.
1817

1918
```console
20-
$ cargo login abcdefghijklmnopqrstuvwxyz012345
19+
$ cargo login
20+
```
21+
22+
Then at the prompt put in the token specified.
23+
```console
24+
please paste the API Token found on https://crates.io/me below
25+
abcdefghijklmnopqrstuvwxyz012345
2126
```
2227

2328
This command will inform Cargo of your API token and store it locally in your

0 commit comments

Comments
 (0)