From e59b3720e97594eeccb5e0a44c40f0cbd78fe7eb Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Mon, 8 Sep 2014 12:27:11 +0200 Subject: [PATCH 1/2] Move custom Omniauth directions to omniauth doc. --- doc/install/installation.md | 44 +++---------------------------------- doc/integration/omniauth.md | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index a3a456659e..0a5cd0b4d4 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -233,7 +233,7 @@ GitLab Shell is an SSH access and repository management software developed speci # By default, the gitlab-shell config is generated from your main GitLab config. # You can review (and modify) the gitlab-shell config as follows: sudo -u git -H editor /home/git/gitlab-shell/config.yml - + **Note:** If you want to use HTTPS, see [Using HTTPS](#using-https) for the additional steps. ### Initialize Database and Activate Advanced Features @@ -308,7 +308,7 @@ Make sure to edit the config file to match your setup: Validate your `gitlab` or `gitlab-ssl` Nginx config file with the following command: sudo nginx -t - + You should receive `syntax is okay` and `test is successful` messages. If you receive errors check your `gitlab` or `gitlab-ssl` Nginx config file for typos, etc. as indiciated in the error message given. ### Restart @@ -364,7 +364,7 @@ Using a self-signed certificate is discouraged but if you must use it follow the sudo openssl req -newkey rsa:2048 -x509 -nodes -days 3560 -out gitlab.crt -keyout gitlab.key sudo chmod o-r gitlab.key ``` - + 1. In the `config.yml` of gitlab-shell set `self_signed_cert` to `true`. ### Additional Markup Styles @@ -398,41 +398,3 @@ You also need to change the corresponding options (e.g. `ssh_user`, `ssh_host`, ### LDAP Authentication You can configure LDAP authentication in `config/gitlab.yml`. Please restart GitLab after editing this file. - -### Using Custom Omniauth Providers - -GitLab uses [Omniauth](http://www.omniauth.org/) for authentication and already ships with a few providers preinstalled (e.g. LDAP, GitHub, Twitter). But sometimes that is not enough and you need to integrate with other authentication solutions. For these cases you can use the Omniauth provider. - -#### Steps - -These steps are fairly general and you will need to figure out the exact details from the Omniauth provider's documentation. - -- Stop GitLab: - - sudo service gitlab stop - -- Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/Gemfile): - - gem "omniauth-your-auth-provider" - -- If you're using MySQL, install the new Omniauth provider gem by running the following command: - - sudo -u git -H bundle install --without development test postgres --path vendor/bundle --no-deployment - -- If you're using PostgreSQL, install the new Omniauth provider gem by running the following command: - - sudo -u git -H bundle install --without development test mysql --path vendor/bundle --no-deployment - - > These are the same commands you used in the [Install Gems section](#install-gems) with `--path vendor/bundle --no-deployment` instead of `--deployment`. - -- Start GitLab: - - sudo service gitlab start - -#### Examples - -If you have successfully set up a provider that is not shipped with GitLab itself, please let us know. - -You can help others by reporting successful configurations and probably share a few insights or provide warnings for common errors or pitfalls by sharing your experience [in the public Wiki](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Custom-omniauth-provider-configurations). - -While we can't officially support every possible authentication mechanism out there, we'd like to at least help those with special needs. diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index 1b0bf9c5f6..367fa0f0dd 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -82,3 +82,41 @@ Existing users can enable OmniAuth for specific providers after the account is c 1. The user will be redirected to the provider. Once the user authorized GitLab they will be redirected back to GitLab. The chosen OmniAuth provider is now active and can be used to sign in to GitLab from then on. + +## Using Custom Omniauth Providers + +GitLab uses [Omniauth](http://www.omniauth.org/) for authentication and already ships with a few providers preinstalled (e.g. LDAP, GitHub, Twitter). But sometimes that is not enough and you need to integrate with other authentication solutions. For these cases you can use the Omniauth provider. + +### Steps + +These steps are fairly general and you will need to figure out the exact details from the Omniauth provider's documentation. + +- Stop GitLab: + + sudo service gitlab stop + +- Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/Gemfile): + + gem "omniauth-your-auth-provider" + +- If you're using MySQL, install the new Omniauth provider gem by running the following command: + + sudo -u git -H bundle install --without development test postgres --path vendor/bundle --no-deployment + +- If you're using PostgreSQL, install the new Omniauth provider gem by running the following command: + + sudo -u git -H bundle install --without development test mysql --path vendor/bundle --no-deployment + + > These are the same commands you used in the [Install Gems section](#install-gems) with `--path vendor/bundle --no-deployment` instead of `--deployment`. + +- Start GitLab: + + sudo service gitlab start + +### Examples + +If you have successfully set up a provider that is not shipped with GitLab itself, please let us know. + +You can help others by reporting successful configurations and probably share a few insights or provide warnings for common errors or pitfalls by sharing your experience [in the public Wiki](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Custom-omniauth-provider-configurations). + +While we can't officially support every possible authentication mechanism out there, we'd like to at least help those with specific needs. From 67c956e16d11c2f0960b2d07efe0f57c617d9cd2 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Mon, 8 Sep 2014 15:30:10 +0200 Subject: [PATCH 2/2] Link the doc in installation document. --- doc/install/installation.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/install/installation.md b/doc/install/installation.md index 0a5cd0b4d4..0fdd48aeb0 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -398,3 +398,7 @@ You also need to change the corresponding options (e.g. `ssh_user`, `ssh_host`, ### LDAP Authentication You can configure LDAP authentication in `config/gitlab.yml`. Please restart GitLab after editing this file. + +### Using Custom Omniauth Providers + +See the [omniauth integration document](doc/integration/omniauth.md)