summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/src/doc/man/includes/options-token.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/src/doc/man/includes/options-token.md')
-rw-r--r--src/tools/cargo/src/doc/man/includes/options-token.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/cargo/src/doc/man/includes/options-token.md b/src/tools/cargo/src/doc/man/includes/options-token.md
new file mode 100644
index 000000000..855204de2
--- /dev/null
+++ b/src/tools/cargo/src/doc/man/includes/options-token.md
@@ -0,0 +1,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}}