From d2a24aaf37d3459fd90c30c0444b8d175570ee64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Soszy=C5=84ski?= Date: Mon, 26 Oct 2020 11:14:22 +0100 Subject: [PATCH] gh-auth: add page (#4839) --- pages/common/gh-auth.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/gh-auth.md 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}}`