summaryrefslogtreecommitdiffstats
path: root/src/doc/man/includes/options-token.md
blob: 855204de2aba7819c87f66106aac702379a65a83 (plain)
1
2
3
4
5
6
7
8
9
10
11
{{#option "`--token` _token_" }}
API token to use when authenticating. This overrides the token stored in
the credentials file (which is created by {{man "cargo-login" 1}}).

[Cargo config](../reference/config.html) environment variables can be
used to override the tokens stored in the credentials file. The token for
crates.io may be specified with the `CARGO_REGISTRY_TOKEN` environment
variable. Tokens for other registries may be specified with environment
variables of the form `CARGO_REGISTRIES_NAME_TOKEN` where `NAME` is the name
of the registry in all capital letters.
{{/option}}