diff --git a/doc/settings/environment-variables.md b/doc/settings/environment-variables.md index bdf42e64f7c1c2fd25706f18a1cef7f07a8ad9bf_ZG9jL3NldHRpbmdzL2Vudmlyb25tZW50LXZhcmlhYmxlcy5tZA==..fafcf5e8caa3e767ace63a4c785fe4c48633c893_ZG9jL3NldHRpbmdzL2Vudmlyb25tZW50LXZhcmlhYmxlcy5tZA== 100644 --- a/doc/settings/environment-variables.md +++ b/doc/settings/environment-variables.md @@ -19,8 +19,8 @@ ```ruby gitlab_rails['env'] = { - "http_proxy" => "http://USERNAME:PASSWORD@example.com:8080", - "https_proxy" => "http://USERNAME:PASSWORD@example.com:8080" + "http_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080", + "https_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080" # "no_proxy" => ".yourdomain.com" # Wildcard syntax if you need your internal domain to bypass proxy } ``` @@ -31,8 +31,8 @@ ```ruby # Needed for proxying Git clones gitaly['env'] = { - "http_proxy" => "http://USERNAME:PASSWORD@example.com:8080", - "https_proxy" => "http://USERNAME:PASSWORD@example.com:8080" + "http_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080", + "https_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080" } gitlab_workhorse['env'] = { @@ -36,8 +36,8 @@ } gitlab_workhorse['env'] = { - "http_proxy" => "http://USERNAME:PASSWORD@example.com:8080", - "https_proxy" => "http://USERNAME:PASSWORD@example.com:8080" + "http_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080", + "https_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080" } gitlab_pages['env'] = { @@ -41,9 +41,9 @@ } gitlab_pages['env'] = { - "http_proxy" => "http://USERNAME:PASSWORD@example.com:8080", - "https_proxy" => "http://USERNAME:PASSWORD@example.com:8080" + "http_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080", + "https_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080" } # If you use the docker registry registry['env'] = { @@ -46,9 +46,9 @@ } # If you use the docker registry registry['env'] = { - "http_proxy" => "http://USERNAME:PASSWORD@example.com:8080", - "https_proxy" => "http://USERNAME:PASSWORD@example.com:8080" + "http_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080", + "https_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080" } ``` @@ -59,7 +59,7 @@ Proxy URL values should generally be `http://` only, unless your proxy has its own SSL certificate and SSL enabled. This means, even for the `https_proxy` value, you should usually specify a value as -`http://USERNAME:PASSWORD@example.com:8080`. +`http://<USERNAME>:<PASSWORD>@example.com:8080`. NOTE: DNS rebind protection is disabled when either the HTTP_PROXY or the HTTPS_PROXY environment variable is set, @@ -75,3 +75,19 @@ ```shell sudo gitlab-ctl reconfigure ``` + +## Troubleshooting + +### An environment variable is not being set + +Check that you don't have multiple entries for the same `['env']`. The last one will override +previous entries. In this example, `NTP_HOST` will not be set: + +```ruby +gitlab_rails['env'] = { 'NTP_HOST' => "<DOMAIN_OF_NTP_SERVICE>" } + +gitlab_rails['env'] = { + "http_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080", + "https_proxy" => "http://<USERNAME>:<PASSWORD>@example.com:8080" +} +```