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 gitlab-shell!406 (merged).
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 gitlab-shell#476 (closed)
Edited by Stan Hu