Commit 448c19aa authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

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
parents 65e5d5cd f2ccb1d3
...@@ -48,6 +48,21 @@ GitHub will generate an application ID and secret key for you to use. ...@@ -48,6 +48,21 @@ GitHub will generate an application ID and secret key for you to use.
For omnibus package: 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 ```ruby
gitlab_rails['omniauth_providers'] = [ gitlab_rails['omniauth_providers'] = [
{ {
...@@ -86,7 +101,7 @@ GitHub will generate an application ID and secret key for you to use. ...@@ -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. 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. 1. Restart GitLab for the changes to take effect.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment