gh-auth-token1
Print the authentication token gh uses for a hostname and account
Usage
gh auth
token
[flags]
Overview
This command outputs the authentication token for an account on a given GitHub host.
Without the --hostname flag, the default host is chosen.
Without the --user flag, the active account for the host is chosen.
Options
-
-h, --hostname <string> -
The hostname of the GitHub instance authenticated with
-
-u, --user <string> -
The account to output the token for
Exit status
0: Successful execution
1: Error
2: Command canceled
4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
Releases
3 releases since Debian 12 (Bookworm); the text changed 2 times.
--user since Debian 13 (Trixie);
-u since Debian 13 (Trixie).