Merge branch 'patch-1' into 'master'

Update github.md

Hi, I ran into a few pitfalls while I enabled OmniAuth to be able to migrate repos from github to my omnibus-gitlab instance today, so here are my findings:

These docs state thate the default authorization callback URL is `'${YOUR_DOMAIN}/import/github/callback'`, but the screenshot only shows `'${YOUR_DOMAIN}'`, which works, so I removed the ambiguity.

When editing `gitlab_rails['omniauth_providers']` for github.com, you have to omit the `"url" => "https://github.com/",` part, otherwise it won't work (OmniAuth will stay deactivated). This is backed by the configuration details of the "from-source-installation" which also omits the url in the `yml` file.

After changing the `gitlab.rb` file, `sudo gitlab-ctl reconfigure` needs to be run, which is missing in the docs.

Following the updated version of this documentation I was able to enable OmniAuth.

If anything I edited is wrong, please correct me, as I don't know how the "from-source-installations" would react to my changes.

Best regards,
Florian

See merge request !4072
This commit is contained in:
Achilleas Pipinellis 2016-11-22 20:26:58 +00:00
commit 448c19aab1

View file

@ -48,6 +48,21 @@ GitHub will generate an application ID and secret key for you to use.
For omnibus package:
For GitHub.com:
```ruby
gitlab_rails['omniauth_providers'] = [
{
"name" => "github",
"app_id" => "YOUR_APP_ID",
"app_secret" => "YOUR_APP_SECRET",
"args" => { "scope" => "user:email" }
}
]
```
For GitHub Enterprise:
```ruby
gitlab_rails['omniauth_providers'] = [
{
@ -86,7 +101,7 @@ GitHub will generate an application ID and secret key for you to use.
1. Change 'YOUR_APP_SECRET' to the client secret from the GitHub application page from step 7.
1. Save the configuration file.
1. Save the configuration file and run `sudo gitlab-ctl reconfigure`.
1. Restart GitLab for the changes to take effect.