Commit 277fcdb8 authored by Kati Paizee's avatar Kati Paizee Committed by Suzanne Selhorn

CTRT edits for GitHub page - part 2

parent b54d43bc
...@@ -116,17 +116,21 @@ your website could enable the covert redirect attack. ...@@ -116,17 +116,21 @@ your website could enable the covert redirect attack.
1. Select the icon. Sign in to GitHub and authorize the GitLab application. 1. Select the icon. Sign in to GitHub and authorize the GitLab application.
## GitHub Enterprise with self-signed Certificate ## Troubleshooting
### Imports from GitHub Enterprise with a self-signed certificate fail
When you import projects from GitHub Enterprise using a self-signed
certificate, the imports fail.
If you are attempting to import projects from GitHub Enterprise with a self-signed To fix this issue, you must disable SSL verification:
certificate and the imports are failing, you must disable SSL verification.
It should be disabled by adding `verify_ssl` to `false` in the provider configuration
and changing the global Git `sslVerify` option to `false` in the GitLab server.
For Omnibus package: 1. Set `verify_ssl` to `false` in the configuration file.
- **For Omnibus installations**
```ruby ```ruby
gitlab_rails['omniauth_providers'] = [ gitlab_rails['omniauth_providers'] = [
{ {
name: "github", name: "github",
# label: "Provider name", # optional label for login button, defaults to "GitHub" # label: "Provider name", # optional label for login button, defaults to "GitHub"
...@@ -136,67 +140,82 @@ gitlab_rails['omniauth_providers'] = [ ...@@ -136,67 +140,82 @@ gitlab_rails['omniauth_providers'] = [
verify_ssl: false, verify_ssl: false,
args: { scope: "user:email" } args: { scope: "user:email" }
} }
] ]
``` ```
You must also disable Git SSL verification on the server hosting GitLab.
```ruby
omnibus_gitconfig['system'] = { "http" => ["sslVerify = false"] }
```
For installation from source: - **For installations from source**
```yaml ```yaml
- { name: 'github', - { name: 'github',
# label: 'Provider name', # optional label for login button, defaults to "GitHub" # label: 'Provider name', # optional label for login button, defaults to "GitHub"
app_id: 'YOUR_APP_ID', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET', app_secret: 'YOUR_APP_SECRET',
url: "https://github.example.com/", url: "https://github.example.com/",
verify_ssl: false, verify_ssl: false,
args: { scope: 'user:email' } } args: { scope: 'user:email' } }
``` ```
You must also disable Git SSL verification on the server hosting GitLab. 1. Change the global Git `sslVerify` option to `false` on the GitLab server.
```shell - **For Omnibus installations**
git config --global http.sslVerify false
```
For the changes to take effect, [reconfigure GitLab](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure) if you installed ```ruby
via Omnibus, or [restart GitLab](../administration/restart_gitlab.md#installations-from-source) if you installed from source. omnibus_gitconfig['system'] = { "http" => ["sslVerify = false"] }
```
## Troubleshooting - **For installations from source**
```shell
git config --global http.sslVerify false
```
### Error 500 when trying to sign in to GitLab via GitHub Enterprise 1. [Reconfigure GitLab](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure)
if you installed using Omnibus, or [restart GitLab](../administration/restart_gitlab.md#installations-from-source)
if you installed from source.
Check the [`production.log`](../administration/logs.md#productionlog) ### Signing in using GitHub Enterprise returns a 500 error
on your GitLab server to obtain further details. If you are getting the error like
`Faraday::ConnectionFailed (execution expired)` in the log, there may be a connectivity issue
between your GitLab instance and GitHub Enterprise. To verify it, [start the rails console](../administration/operations/rails_console.md#starting-a-rails-console-session)
and run the commands below replacing `<github_url>` with the URL of your GitHub Enterprise instance:
```ruby This error can occur because of a network connectivity issue between your
uri = URI.parse("https://<github_url>") # replace `GitHub-URL` with the real one here GitLab instance and GitHub Enterprise.
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true To check for a connectivity issue:
http.verify_mode = 1
response = http.request(Net::HTTP::Get.new(uri.request_uri))
```
If you are getting a similar `execution expired` error, it confirms the theory about the 1. Go to the [`production.log`](../administration/logs.md#productionlog)
network connectivity. In that case, make sure that the GitLab server is able to reach your on your GitLab server and look for the following error:
GitHub enterprise instance.
``` plaintext
Faraday::ConnectionFailed (execution expired)
```
1. [Start the rails console](../administration/operations/rails_console.md#starting-a-rails-console-session)
and run the following commands. Replace `<github_url>` with the URL of your
GitHub Enterprise instance:
```ruby
uri = URI.parse("https://<github_url>") # replace `GitHub-URL` with the real one here
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = 1
response = http.request(Net::HTTP::Get.new(uri.request_uri))
```
1. If a similar `execution expired` error is returned, this confirms the error is
caused by a connectivity issue. Make sure the GitLab server can reach
your GitHub Enterprise instance.
### Signing in using your GitHub account without a pre-existing GitLab account is not allowed ### Signing in using your GitHub account without a pre-existing GitLab account is not allowed
If you're getting the message `Signing in using your GitHub account without a pre-existing When you sign in to GitLab, you get the following error:
GitLab account is not allowed. Create a GitLab account first, and then connect it to your
GitHub account` when signing in, in GitLab:
1. In the top-right corner, select your avatar. ```plaintext
Signing in using your GitHub account without a pre-existing
GitLab account is not allowed. Create a GitLab account first,
and then connect it to your GitHub account
```
To fix this issue, you must activate GitHub sign-in in GitLab:
1. On the top bar, in the top right corner, select your avatar.
1. Select **Edit profile**. 1. Select **Edit profile**.
1. On the left sidebar, select **Account**. 1. On the left sidebar, select **Account**.
1. In the **Social sign-in** section, select **Connect to GitHub**. 1. In the **Social sign-in** section, select **Connect to GitHub**.
After that, you should be able to sign in via GitHub successfully.
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