Blog Engineering Git Protocol v2 now enabled for SSH on
Published on December 10, 2018
1 min read

Git Protocol v2 now enabled for SSH on

Fetch faster using Git Protocol v2 – here's how.

Blog fallback hero

GitLab added support for Git Protocol v2 over HTTP and SSH in GitLab 11.4, and enabled Protocol v2 over HTTP on, but not for SSH. On Nov. 23, we enabled Git Protocol v2 over SSH on You can view Git Protocol usage on our public dashboard.

Git Protocol v2 is supported from Git v2.18.0 and is opt-in. To enable globally, run git config --global protocol.version 2.

What Git Protocol v2 means for you

Git 2.18 introduced support for Protocol v2, 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. Read more about Protocol v2 in the release post by the author of the change.

To see the reduction in network traffic with Protocol v2 you can run the commands below:

# Original Git wire protocol
GIT_TRACE_PACKET=1 git -c protocol.version=0 ls-remote [email protected]:gitlab-org/gitlab-ce.git master

# New Git wire protocol v2
GIT_TRACE_PACKET=1 git -c protocol.version=2 ls-remote [email protected]:gitlab-org/gitlab-ce.git master

In moving from Protocol v0 to v2, on this repo the number of lines ("packets") sent behind the scenes drops from over 36,000 to fewer than 30.

We want to hear from you

Enjoyed reading this blog post or have questions or feedback? Share your thoughts by creating a new topic in the GitLab community forum. Share your feedback

Ready to get started?

See what your team could do with a unified DevSecOps Platform.

Get free trial

New to GitLab and not sure where to start?

Get started guide

Learn about what GitLab can do for your team

Talk to an expert