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