Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #46555

Closed
Open
Opened May 21, 2018 by Ben Bodenmiller@bbodenmillerDeveloper

Support Git protocol version 2

Starting with the upcoming Git 2.18 release, there will be a new Git protocol: version 2. The protocol is what drives git clone, git push etc and is meant to be more bandwidth efficient. The main improvements are:

  • Server-side filtering of references
  • Easy extensibility for new features like ref-in-want and fetching and pushing symrefs
  • Simplified client handling of the http transport

When Git 2.18 is released we should offer support in the next release of GitLab.

Proposal

When a Git session is established (e.g. git clone), the client can signal it supports the v2 protocol. It is then up to the server (GitLab) to decide whether to use the old v1 protocol or v2. Once Git 2.18 is released, GitLab servers will start receiving Git sessions from clients that advertise they can use v2. If we do nothing, everything just keeps working with protocol v1.

In order for GitLab servers to start answering with the v2 protocol we need to do a few things:

  • (required) install Git 2.18 on Gitaly servers in gitlab-omnibus
  • (required) propagate the Git-Protocol HTTP header in workhorse -> gitaly -> git
  • (required) propagate the Git-Protocol environment variable in sshd -> gitlab-shell -> gitaly -> git
  • (optional) gate the v2 advertisement with a feature flag so that we can stop it from reaching gitaly. That way we would be in control of whether the v2 protocol is active or not.

Links / references

  • Introducing Git protocol version 2
  • https://github.com/git/git/commit/9bfa0f9be3e718f701200a242ea04259a4dc4dfc
Edited Jun 21, 2018 by James Ramsay
Assignee
Assign to
11.4
Milestone
11.4 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab-foss#46555