![Forrest logo](/images/logo.png)
gh-auth:tldr:11384
gh-auth: Log out.
$ gh auth logout
try on your machine
The command "gh auth logout" is used to log out of the GitHub CLI tool (gh). It removes the currently authenticated GitHub account from the CLI configuration.
When you log in to the GitHub CLI tool using the "gh auth login" command, your credentials are saved in a configuration file on your machine. This allows you to use the CLI tool without requiring authentication for subsequent commands until you log out.
By running "gh auth logout," you will end the current session and remove the stored credentials, requiring you to log in again when using the CLI tool in the future. This is particularly useful if you want to switch to a different GitHub account or revoke access to the current account.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.