fork/cargo

git clone https://git.julia.blue/fork/cargo

borsAuto merge of #12649 - arlosi:cred-stable, r=weihanglo7149418ed

0.93.0
4.6 KiB122 linesraw
1CARGO-LOGOUT(1)
2
3NAME
4       cargo-logout — Remove an API token from the registry locally
5
6SYNOPSIS
7       cargo logout [options]
8
9DESCRIPTION
10       This command will run a credential provider to remove a saved token.
11
12       For the default cargo:token credential provider, credentials are stored
13       in $CARGO_HOME/credentials.toml where $CARGO_HOME defaults to .cargo in
14       your home directory.
15
16       If a registry has a credential-provider specified, it will be used.
17       Otherwise, the providers from the config value
18       registry.global-credential-providers will be attempted, starting from
19       the end of the list.
20
21       If --registry is not specified, then the credentials for the default
22       registry will be removed (configured by registry.default
23       <https://doc.rust-lang.org/cargo/reference/config.html#registrydefault>,
24       which defaults to <https://crates.io/>).
25
26       This will not revoke the token on the server. If you need to revoke the
27       token, visit the registry website and follow its instructions (see
28       <https://crates.io/me> to revoke the token for <https://crates.io/>).
29
30OPTIONS
31   Logout Options
32       --registry registry
33           Name of the registry to use. Registry names are defined in Cargo
34           config files
35           <https://doc.rust-lang.org/cargo/reference/config.html>. If not
36           specified, the default registry is used, which is defined by the
37           registry.default config key which defaults to crates-io.
38
39   Display Options
40       -v, --verbose
41           Use verbose output. May be specified twice for “very verbose”
42           output which includes extra output such as dependency warnings and
43           build script output. May also be specified with the term.verbose
44           config value
45           <https://doc.rust-lang.org/cargo/reference/config.html>.
46
47       -q, --quiet
48           Do not print cargo log messages. May also be specified with the
49           term.quiet config value
50           <https://doc.rust-lang.org/cargo/reference/config.html>.
51
52       --color when
53           Control when colored output is used. Valid values:
54
55           o  auto (default): Automatically detect if color support is
56              available on the terminal.
57
58           o  always: Always display colors.
59
60           o  never: Never display colors.
61
62           May also be specified with the term.color config value
63           <https://doc.rust-lang.org/cargo/reference/config.html>.
64
65   Common Options
66       +toolchain
67           If Cargo has been installed with rustup, and the first argument to
68           cargo begins with +, it will be interpreted as a rustup toolchain
69           name (such as +stable or +nightly). See the rustup documentation
70           <https://rust-lang.github.io/rustup/overrides.html> for more
71           information about how toolchain overrides work.
72
73       --config KEY=VALUE or PATH
74           Overrides a Cargo configuration value. The argument should be in
75           TOML syntax of KEY=VALUE, or provided as a path to an extra
76           configuration file. This flag may be specified multiple times. See
77           the command-line overrides section
78           <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides>
79           for more information.
80
81       -C PATH
82           Changes the current working directory before executing any specified
83           operations. This affects things like where cargo looks by default
84           for the project manifest (Cargo.toml), as well as the directories
85           searched for discovering .cargo/config.toml, for example. This
86           option must appear before the command name, for example cargo -C
87           path/to/my-project build.
88
89           This option is only available on the nightly channel
90           <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and
91           requires the -Z unstable-options flag to enable (see #10098
92           <https://github.com/rust-lang/cargo/issues/10098>).
93
94       -h, --help
95           Prints help information.
96
97       -Z flag
98           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
99           details.
100
101ENVIRONMENT
102       See the reference
103       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
104       for details on environment variables that Cargo reads.
105
106EXIT STATUS
107       o  0: Cargo succeeded.
108
109       o  101: Cargo failed to complete.
110
111EXAMPLES
112       1. Remove the default registry token:
113
114              cargo logout
115
116       2. Remove the token for a specific registry:
117
118              cargo logout --registry my-registry
119
120SEE ALSO
121       cargo(1), cargo-login(1)
122