Text of cli.github.com › manual › gh_help_exit-codes as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

GitHub CLI | Take GitHub to the command line

CLI manual gh exit-codes gh follows normal conventions regarding exit codes. If a command completes successfully, the exit code will be 0 If a command fails for any reason, the exit code will be 1 If a command is running but gets cancelled, the exit code will be 2 If a command requires authentication, the exit code will be 4 NOTE: It is possible that a particular command may have more exit codes, so it is a good practice to check documentation for the command if you are relying on exit codes to control some behavior.

See also gh