Enable GitHub integration on GitLab
In order to migrate repositories from GitHub to GitLab including issues/PRs etc we need the GitHub <-> GitLab integration setup and working. This involves configuring/enabling the GitHub Oauth provider. There are a few caveats and potential points we should resolve/discuss first:
- By default the OmniAuth provider allows/includes login using GitHub credentials:
- Option 1: Leave this enabled (see point 2.)
- Option 2: Disable this (see point 3.)
- If we enable the GH OmniAuth provider and we want to allow users to login with GitHub credentials we need to make sure we allow these to link to users with a CiviCRM LDAP account. The instructions below are for Omnibus gitlab installations - for installation from source the links provided will cover configuration:
gitlab_rails['omniauth_providers'] = [ { "name" => "github", "app_id" => "YOUR_APP_ID", "app_secret" => "YOUR_APP_SECRET", "args" => { "scope" => "user:email" } } ] gitlab_rails['omniauth_auto_link_ldap_user'] = true gitlab_rails['sync_profile_from_provider'] = ['github']
- If we chose to disable the login portion of the OmniAuth provider we need the following instead of the
gitlab_rails['omniauth_auto_link_ldap_user']
line above:
In addition to providing for repository syncing/migration this will provide an way for people to link their GitLab and GitHub accounts which could provide us with useful methods to link our CiviCRM.org users/accounts and their GitHub contributions.
Edited by homotechsual