Search code examples
githttp2

Can git clone benefit from http2


Can git clone benefit from http2?

I do always prefer ssh over http(s) because of various network errors but also ssh seems to be a bit faster than http(s). So my question is: Could git, especially clone, benefit from http2 s multiplexing functionality for example?


Solution

  • The smart protocol over HTTP uses a few long-running requests; HTTP/2 would not benefit dramatically here.

    By contrast, the dumb protocol makes far more separate requests, and could benefit. However:

    The dumb protocol is fairly rarely used these days. It’s difficult to secure or make private, so most Git hosts (both cloud-based and on-premises) will refuse to use it.

    In practice, without designing a new protocol to take advantage of HTTP/2, I would expect SSH to continue to give the best results.