diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 09:09:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 09:09:32 +0300 |
commit | afb35e247139c24382a0bb3da893ce156e183be2 (patch) | |
tree | 82b74d1eaa6d17ddb53118b205fb91764a4f24d6 /doc/integration/gitlab.md | |
parent | 58c0ae1238785d0964789537be3d75f94e8d60dd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/integration/gitlab.md')
-rw-r--r-- | doc/integration/gitlab.md | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index 1f35faacc2e..43dfc013ade 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -48,7 +48,7 @@ GitLab.com generates an application ID and secret key for you to use. 1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. 1. Add the provider configuration: - For Omnibus installations: + For Omnibus installations authenticating against **GitLab.com**: ```ruby gitlab_rails['omniauth_providers'] = [ @@ -61,7 +61,20 @@ GitLab.com generates an application ID and secret key for you to use. ] ``` - For installations from source: + Or, for Omnibus installations authenticating against a different GitLab instance: + + ```ruby + gitlab_rails['omniauth_providers'] = [ + { + "name" => "gitlab", + "app_id" => "YOUR_APP_ID", + "app_secret" => "YOUR_APP_SECRET", + "args" => { "scope" => "api", "client_options" => { "site" => "https://gitlab.example.com/api/v4" } } + } + ] + ``` + + For installations from source authenticating against **GitLab.com**: ```yaml - { name: 'gitlab', @@ -70,6 +83,15 @@ GitLab.com generates an application ID and secret key for you to use. args: { scope: 'api' } } ``` + Or, for installations from source to authenticate against a different GitLab instance: + + ```yaml + - { name: 'gitlab', + app_id: 'YOUR_APP_ID', + app_secret: 'YOUR_APP_SECRET', + args: { scope: 'api', "client_options": { "site": 'https://gitlab.example.com/api/v4' } } + ``` + 1. Change `'YOUR_APP_ID'` to the Application ID from the GitLab.com application page. 1. Change `'YOUR_APP_SECRET'` to the secret from the GitLab.com application page. 1. Save the configuration file. |