5 cargo-login --- Save an API token from the registry locally
9 `cargo login` [_options_] [_token_]
13 This command will save the API token to disk so that commands that require
14 authentication, such as {{man "cargo-publish" 1}}, will be automatically
15 authenticated. The token is saved in `$CARGO_HOME/credentials.toml`. `CARGO_HOME`
16 defaults to `.cargo` in your home directory.
18 If the _token_ argument is not specified, it will be read from stdin.
20 The API token for crates.io may be retrieved from <https://crates.io/me>.
22 Take care to keep the token secret, it should not be shared with anyone else.
29 {{> options-registry }}
35 {{> options-display }}
38 {{> section-options-common }}
40 {{> section-environment }}
42 {{> section-exit-status }}
46 1. Save the API token to disk:
51 {{man "cargo" 1}}, {{man "cargo-logout" 1}}, {{man "cargo-publish" 1}}