diff --git a/pages/common/gh-auth.md b/pages/common/gh-auth.md new file mode 100644 index 0000000000..282fb70107 --- /dev/null +++ b/pages/common/gh-auth.md @@ -0,0 +1,24 @@ +# gh auth + +> Authenticate with a GitHub host from the command line. +> More information: . + +- Login with interactive prompt: + +`gh auth login` + +- Login with a token from standard input (created in https://github.com/settings/tokens): + +`echo {{your_token}} | gh auth login --with-token` + +- Check if you are logged in: + +`gh auth status` + +- Log out: + +`gh auth logout` + +- Login with a specific GitHub Enterprise Server: + +`gh auth login --hostname {{github.example.com}}`