Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encourage pasting in login tokens, rather than passing on the command-line #3866

Closed
epage opened this issue Mar 25, 2024 · 2 comments · Fixed by #3506
Closed

Encourage pasting in login tokens, rather than passing on the command-line #3866

epage opened this issue Mar 25, 2024 · 2 comments · Fixed by #3506

Comments

@epage
Copy link

epage commented Mar 25, 2024

URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#setting-up-a-cratesio-account

Description of the problem: This shows cargo login <token> rather than cargo login with <token> pasted in. This is encouraging users to put their token in their command history (which could also be synced across computers) and is always visible (which is true of pasting, for now, but that can be fixed, see rust-lang/cargo#7813 )

Suggested fix: Copy what the Cargo book does: show the prompt with the token being pasted in.

@chriskrycho
Copy link
Contributor

Ah, we should definitely fix this while working on the 2024 edition revisions. I will see if I can write a PR updating the text (after reading the Cargo book section!) this afternoon. Thanks, @epage!

@chriskrycho
Copy link
Contributor

Aha! @schuelermine caught this last year and opened #3506 to fix it, so we should have it fixed in the online text when that merges after passing CI! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants