Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2020-08-20 07:31:37 +0300
committerStan Hu <stanhu@gmail.com>2020-08-21 23:06:06 +0300
commit09a6677212e8b507f368f5b80e92525c577ab256 (patch)
tree058a7a0e5988e76e2a2e173356f4eb3b9c9dccce /config.toml.example
parenta7f84c7c8ea135881fd2cc6c7f48fdc487b125fb (diff)
Fix Git hooks when GitLab relative URL path and UNIX socket in use
Previously if GitLab were configured to use a relative URL (e.g. `/gitlab`) and the Gitaly `gitlab.url` configuration used the http+unix:// scheme, the hooks would not be able to contact the API server. We add an explicit `relative_url_root` parameter to make it possible for all connections to go through Workhorse. This commit depends on changes in https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/406. NOTE: This only fixes the Git hooks that are implemented in Go. The Ruby gitlab-shell hooks don't appear to have ever work with GitLab installations using a relative URL when a UNIX domain socket is used. Omnibus installations bypass Workhorse and talk directly to the Web server. Relates to https://gitlab.com/gitlab-org/gitlab-shell/-/issues/476
Diffstat (limited to 'config.toml.example')
-rw-r--r--config.toml.example3
1 files changed, 3 insertions, 0 deletions
diff --git a/config.toml.example b/config.toml.example
index 1332f6f9d..d0b2db3d1 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -93,6 +93,9 @@ custom_hooks_dir = "/home/git/custom_hooks"
[gitlab]
secret_file = "/home/git/gitlab-shell/.gitlab_shell_secret"
url = "http+unix://%2Fhome%2Fgit%2Fgitlab%2Ftmp%2Fsockets%2Fgitlab-workhorse.socket"
+# Only needed if a UNIX socket is used in `url` and GitLab is configured to
+# use a relative path (e.g. /gitlab).
+# relative_url_root = '/'
[gitlab.http-settings]
# read_timeout = 300