---
features:
  secondary:
  - name: Enable Git protocol v2 for SSH
    available_in: [core, starter, premium, ultimate]
    documentation_link: 'https://docs.gitlab.com/ee/administration/git_protocol.html'
    gitlab_com: true
    reporter: jramsay
    stage: create
    categories:
    - Gitaly
    issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/207798
    description: |
      We've re-enabled support for Git protocol v2 over SSH. In the previous release, GitLab 12.8, we re-enabled support for Git protocol v2 over HTTP. It was previously announced in GitLab 11.4, but was disabled due to a security issue in Git versions before Git 2.21.

      Developers fetch refs many times a day to check if the current branch is behind the remote branch. Previously, all responses to fetch commands included a list of all references in the repository. For example, fetching updates for a single branch (e.g. `git fetch origin master`) would also retrieve a complete list of all references. In the case of large projects, this could be over 100,000 refs and tens of megabytes of data. Now, only the needed refs are transferred.

      Git protocol v2 is a major update to Git's [wire protocol](https://www.kernel.org/pub/software/scm/git/docs/technical/pack-protocol.html) which defines how clones, fetches, and pushes are communicated between the client (your computer) and the server (GitLab). The new wire protocol improves the performance of fetch commands and enables future protocol improvements.

      Git protocol v2 is enabled by default from Git 2.26, and available from Git 2.18 by running `git config --global protocol.version 2`.
