LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cargo-logout

Remove a saved registry API token

TLDR

Logout from crates.io
$ cargo logout
copy
Logout from specific registry
$ cargo logout --registry [my-registry]
copy

SYNOPSIS

cargo logout [options]

DESCRIPTION

cargo logout removes the API token for a registry from local storage. This revokes the token saved by cargo login.

PARAMETERS

--registry name

Registry to logout from (default: crates-io)
-v, --verbose
Verbose output
-q, --quiet
Suppress output

BEHAVIOR

Removes the token entry from ~/.cargo/credentials.toml for the specified registry. Does not revoke the token on the server side.

INSTALL

sudo apt install cargo
copy
sudo dnf install cargo
copy
sudo apk add cargo
copy
sudo zypper install cargo
copy
nix profile install nixpkgs#cargo
copy

CAVEATS

To fully revoke access, also regenerate the token on the registry website (e.g., https://crates.io/me for crates.io). Only removes local credentials.

SEE ALSO

RESOURCES

Copied to clipboard
Kai