Commit 6eda59b7 authored by Yorick Peterse's avatar Yorick Peterse

Merge branch 'security-2780-disable-git-v2-protocol-11-5' into 'security-11-5'

[11.5] Disable git v2 protocol temporarily

See merge request gitlab/gitlabhq!2861

(cherry picked from commit 49f3d2ccb4c47073caac7d05fb068d09e20fb93c)

d28a201c Allow Gitaly to be built from a custom URL
66e00613 Disable git v2 protocol temporarily
parent 9244acfd
title: Disable git v2 protocol temporarily
type: security
......@@ -5,6 +5,13 @@ description: "Set and configure Git protocol v2"
# Configuring Git Protocol v2
> [Introduced]( in GitLab 11.4.
> [Temporarily disabled]( in GitLab 11.5.8, 11.6.6, 11.7.1, and 11.8+
NOTE: **Note:**
Git protocol v2 support has been [temporarily disabled](,
as a feature used to hide certain internal references does not function when it
is enabled, and this has a security impact. Once this problem has been resolved,
protocol v2 support will be re-enabled.
......@@ -130,6 +130,25 @@ Gitaly. To use a custom Gitaly version in CI you need to update
GITALY_SERVER_VERSION. You can use the format `=revision` to use a
non-tagged commit from in CI.
To use a different Gitaly repository, e.g., if your changes are present
on a fork, you can specify a `GITALY_REPO_URL` environment variable when
running tests:
GITALY_REPO_URL= bundle exec rspec spec/lib/gitlab/git/repository_spec.rb
If your fork of Gitaly is private, you can generate a [Deploy Token](../user/project/deploy_tokens/
and specify it in the URL:
GITALY_REPO_URL= bundle exec rspec spec/lib/gitlab/git/repository_spec.rb
To use a custom Gitaly repository in CI, for instance if you want your
GitLab fork to always use your own Gitaly fork, set `GITALY_REPO_URL`
as a [CI environment variable](../ci/variables/
[Return to Development documentation](
......@@ -156,11 +156,12 @@ module TestEnv
def setup_gitaly
socket_path = Gitlab::GitalyClient.address('default').sub(/\Aunix:/, '')
gitaly_dir = File.dirname(socket_path)
install_gitaly_args = [gitaly_dir, repos_path, gitaly_url].compact.join(',')
install_dir: gitaly_dir,
version: Gitlab::GitalyClient.expected_server_version,
task: "gitlab:gitaly:install[#{gitaly_dir},#{repos_path}]") do
task: "gitlab:gitaly:install[#{install_gitaly_args}]") do
......@@ -210,6 +211,10 @@ module TestEnv
# The process can already be gone if the test run was INTerrupted.
def gitaly_url
ENV.fetch('GITALY_REPO_URL', nil)
def setup_factory_repo
setup_repo(factory_repo_path, factory_repo_path_bare, factory_repo_name,
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