From 7949db8e03499c011a32f9baa928c0b3e5f4c8ff Mon Sep 17 00:00:00 2001 From: Eric Paulsen Date: Thu, 23 Mar 2023 10:53:42 -0400 Subject: [PATCH] docs: add GHE token & auth URLs (#6751) * docs: add GHE token & auth URLs * cleanup --- docs/admin/git-providers.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/admin/git-providers.md b/docs/admin/git-providers.md index 320baa5bf9..122448054c 100644 --- a/docs/admin/git-providers.md +++ b/docs/admin/git-providers.md @@ -31,6 +31,16 @@ CODER_GITAUTH_0_CLIENT_ID=xxxxxx CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx ``` +### GitHub Enterprise + +GitHub Enterprise requires the following authentication and token URLs: + +```console +CODER_GITAUTH_0_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info" +CODER_GITAUTH_0_AUTH_URL="https://github.example.com/login/oauth/authorize" +CODER_GITAUTH_0_TOKEN_URL="https://github.example.com/login/oauth/access_token" +``` + ### Self-managed git providers Custom authentication and token URLs should be @@ -70,8 +80,9 @@ CODER_GITAUTH_1_TYPE=github CODER_GITAUTH_1_CLIENT_ID=xxxxxx CODER_GITAUTH_1_CLIENT_SECRET=xxxxxxx CODER_GITAUTH_1_REGEX=github.example.com -CODER_GITAUTH_1_AUTH_URL="https://github.example.com/oauth/authorize" -CODER_GITAUTH_1_TOKEN_URL="https://github.example.com/oauth/token" +CODER_GITAUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize" +CODER_GITAUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token" +CODER_GITAUTH_1_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info" ``` To support regex matching for paths (e.g. github.com/orgname), you'll need to add this to the [Coder agent startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#startup_script):