cargo
cargo login
A credential provider stores or retrieves registry authentication. Use an approved provider and least-privilege token. Never paste real tokens into examples, command arguments, repository files or logs. Example format: shell. Illustrative only; do not execute against real accounts or unreviewed sources. Expected result (not executed): Displays help without logging in; actual login is deliberately not attempted. Common mistake: Assuming every provider encrypts credentials; cargo:token stores them as plaintext.
Formal Syntax & Structure
rust syntaxrust
cargo login [OPTIONS]Working Example
Example Snippetrust
cargo login --help