From 5194214e3a2f97accf0c8119b4cb39fd4fcef5db Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Tue, 27 Jan 2015 15:37:19 -0800 Subject: GitLab integration. Importer --- doc/integration/gitlab.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 doc/integration/gitlab.md (limited to 'doc/integration/gitlab.md') diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md new file mode 100644 index 00000000000..47f187b021c --- /dev/null +++ b/doc/integration/gitlab.md @@ -0,0 +1,54 @@ +# GitLab OAuth2 OmniAuth Provider + +To enable the GitLab OmniAuth provider you must register your application with GitLab. GitLab will generate a client ID and secret key for you to use. + +1. Sign in to GitLab. + +1. Navigate to your settings. + +1. Select "Applications" in the left menu. + +1. Select "New application". + +1. Provide the required details. + - Name: This can be anything. Consider something like "\'s GitLab" or "\'s GitLab" or something else descriptive. + - Redirect URI: + + ``` + http://gitlab.example.com/importers/gitlab/callback + http://gitlab.example.com/users/auth/gitlab/callback + ``` + + The first link is required for the importer and second for the authorization. + +1. Select "Submit". + +1. You should now see a Application ID and Secret. Keep this page open as you continue configuration. + +1. On your GitLab server, open the configuration file. + + ```sh + cd /home/git/gitlab + + sudo -u git -H editor config/gitlab.yml + ``` + +1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details. + +1. Under `providers:` uncomment (or add) lines that look like the following: + + ``` + - { name: 'gitlab', app_id: 'YOUR APP ID', + app_secret: 'YOUR APP SECRET', + args: { scope: 'api' } } + ``` + +1. Change 'YOUR APP ID' to the Application ID from the GitLab application page. + +1. Change 'YOUR APP SECRET' to the secret from the GitLab application page. + +1. Save the configuration file. + +1. Restart GitLab for the changes to take effect. + +On the sign in page there should now be a GitLab icon below the regular sign in form. Click the icon to begin the authentication process. GitLab will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to your GitLab instance and will be signed in. -- cgit v1.2.1 From 33349dd54928a0b074b4ae3ebfabf214799fc085 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 2 Feb 2015 17:01:07 -0800 Subject: GitLab.com integration: refactoring --- doc/integration/gitlab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/integration/gitlab.md') diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index 47f187b021c..b3b1d897225 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -15,7 +15,7 @@ To enable the GitLab OmniAuth provider you must register your application with G - Redirect URI: ``` - http://gitlab.example.com/importers/gitlab/callback + http://gitlab.example.com/import/gitlab/callback http://gitlab.example.com/users/auth/gitlab/callback ``` -- cgit v1.2.1 From d76c5824bc05640d276be96f7853f2d266fd6750 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Fri, 13 Feb 2015 14:49:19 -0800 Subject: Update oauth documenatation with examples for omnibus package and installations from source. --- doc/integration/gitlab.md | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) (limited to 'doc/integration/gitlab.md') diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index b3b1d897225..b95ef5c0af3 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -12,35 +12,60 @@ To enable the GitLab OmniAuth provider you must register your application with G 1. Provide the required details. - Name: This can be anything. Consider something like "\'s GitLab" or "\'s GitLab" or something else descriptive. - - Redirect URI: - + - Redirect URI: + ``` http://gitlab.example.com/import/gitlab/callback http://gitlab.example.com/users/auth/gitlab/callback ``` - The first link is required for the importer and second for the authorization. + The first link is required for the importer and second for the authorization. 1. Select "Submit". 1. You should now see a Application ID and Secret. Keep this page open as you continue configuration. +1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). Keep this page open as you continue configuration. ![GitHub app](github_app.png) + 1. On your GitLab server, open the configuration file. + For omnibus package: + ```sh - cd /home/git/gitlab + sudo editor /etc/gitlab/gitlab.rb + ``` + + For instalations from source: - sudo -u git -H editor config/gitlab.yml + ```sh + cd /home/git/gitlab + + sudo -u git -H editor config/gitlab.yml ``` -1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details. +1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. + +1. Add the provider configuration: + + For omnibus package: + + ```ruby + gitlab_rails['omniauth_providers'] = [ + { + "name" => "gitlab", + "app_id" => "YOUR APP ID", + "app_secret" => "YOUR APP SECRET", + "args" => { "scope" => "api" } } + } + ] + ``` -1. Under `providers:` uncomment (or add) lines that look like the following: + For installations from source: ``` - - { name: 'gitlab', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET', - args: { scope: 'api' } } + - { name: 'gitlab', app_id: 'YOUR APP ID', + app_secret: 'YOUR APP SECRET', + args: { scope: 'api' } } ``` 1. Change 'YOUR APP ID' to the Application ID from the GitLab application page. -- cgit v1.2.1 From ff70d2f24e8b437a4c006b61a9b669309718baad Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 18 Feb 2015 22:06:49 -0800 Subject: Improve GitLab.com integration documentation --- doc/integration/gitlab.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'doc/integration/gitlab.md') diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index b95ef5c0af3..87400bed5b5 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -1,10 +1,13 @@ -# GitLab OAuth2 OmniAuth Provider +# Integrate your server with GitLab.com -To enable the GitLab OmniAuth provider you must register your application with GitLab. GitLab will generate a client ID and secret key for you to use. +Import projects from GitLab.com and login to your GitLab instance with your GitLab.com account. -1. Sign in to GitLab. +To enable the GitLab.com OmniAuth provider you must register your application with GitLab.com. +GitLab.com will generate a application ID and secret key for you to use. -1. Navigate to your settings. +1. Sign in to GitLab.com + +1. Navigate to your profile settings. 1. Select "Applications" in the left menu. @@ -15,17 +18,17 @@ To enable the GitLab OmniAuth provider you must register your application with G - Redirect URI: ``` - http://gitlab.example.com/import/gitlab/callback - http://gitlab.example.com/users/auth/gitlab/callback + http://your-gitlab.example.com/import/gitlab/callback + http://your-gitlab.example.com/users/auth/gitlab/callback ``` The first link is required for the importer and second for the authorization. 1. Select "Submit". -1. You should now see a Application ID and Secret. Keep this page open as you continue configuration. - -1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). Keep this page open as you continue configuration. ![GitHub app](github_app.png) +1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). + Keep this page open as you continue configuration. + ![GitLab app](gitlab_app.png) 1. On your GitLab server, open the configuration file. @@ -43,7 +46,7 @@ To enable the GitLab OmniAuth provider you must register your application with G sudo -u git -H editor config/gitlab.yml ``` -1. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for inital settings. +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for inital settings. 1. Add the provider configuration: @@ -76,4 +79,6 @@ To enable the GitLab OmniAuth provider you must register your application with G 1. Restart GitLab for the changes to take effect. -On the sign in page there should now be a GitLab icon below the regular sign in form. Click the icon to begin the authentication process. GitLab will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to your GitLab instance and will be signed in. +On the sign in page there should now be a GitLab.com icon below the regular sign in form. +Click the icon to begin the authentication process. GitLab.com will ask the user to sign in and authorize the GitLab application. +If everything goes well the user will be returned to your GitLab instance and will be signed in. -- cgit v1.2.1 From 20691df230332022cb4d5008d84c7ee6e6c8dbfd Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 18 Feb 2015 22:42:52 +0100 Subject: Add Bitbucket integration docs. --- doc/integration/gitlab.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc/integration/gitlab.md') diff --git a/doc/integration/gitlab.md b/doc/integration/gitlab.md index 87400bed5b5..49ffaa62af8 100644 --- a/doc/integration/gitlab.md +++ b/doc/integration/gitlab.md @@ -3,7 +3,7 @@ Import projects from GitLab.com and login to your GitLab instance with your GitLab.com account. To enable the GitLab.com OmniAuth provider you must register your application with GitLab.com. -GitLab.com will generate a application ID and secret key for you to use. +GitLab.com will generate an application ID and secret key for you to use. 1. Sign in to GitLab.com @@ -46,7 +46,7 @@ GitLab.com will generate a application ID and secret key for you to use. sudo -u git -H editor config/gitlab.yml ``` -1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for inital settings. +1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. 1. Add the provider configuration: @@ -56,8 +56,8 @@ GitLab.com will generate a application ID and secret key for you to use. gitlab_rails['omniauth_providers'] = [ { "name" => "gitlab", - "app_id" => "YOUR APP ID", - "app_secret" => "YOUR APP SECRET", + "app_id" => "YOUR_APP_ID", + "app_secret" => "YOUR_APP_SECRET", "args" => { "scope" => "api" } } } ] @@ -66,14 +66,14 @@ GitLab.com will generate a application ID and secret key for you to use. For installations from source: ``` - - { name: 'gitlab', app_id: 'YOUR APP ID', - app_secret: 'YOUR APP SECRET', + - { name: 'gitlab', app_id: 'YOUR_APP_ID', + app_secret: 'YOUR_APP_SECRET', args: { scope: 'api' } } ``` -1. Change 'YOUR APP ID' to the Application ID from the GitLab application page. +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 application page. +1. Change 'YOUR_APP_SECRET' to the secret from the GitLab.com application page. 1. Save the configuration file. @@ -81,4 +81,4 @@ GitLab.com will generate a application ID and secret key for you to use. On the sign in page there should now be a GitLab.com icon below the regular sign in form. Click the icon to begin the authentication process. GitLab.com will ask the user to sign in and authorize the GitLab application. -If everything goes well the user will be returned to your GitLab instance and will be signed in. +If everything goes well the user will be returned to your GitLab instance and will be signed in. \ No newline at end of file -- cgit v1.2.1