4

I'm using git-http-backend behind apache and some, but not all, users are saying that git push hangs for them. After enabling GIT_TRACE=1 GIT_CURL_VERBOSE=1, we see that they are using http/2 and there is a suspicious line that says

17 bytes stray data read before trying h2 connection

When I ask them to force http/1.1, the problem goes away. Wireshark doesn't seem to help since the data is encrypted and I'm out of ideas on how to debug this issue. Any ideas on how to proceed would be very helpful!

Why would there be stray data with http/2 and is there anything I can do to debug this issue?

Jesse Shieh
  • 4,660
  • 5
  • 34
  • 49
  • 1
    Should be able to trace this by adding and env var SSLKEYLOGFILE=/tmp/certs then wireshark can use this file to decrypt TLS. – exussum Mar 02 '20 at 05:54

1 Answers1

1

You must have seen this, which recommends:

git config --local http.version HTTP/1.1

But it also mention "an HTTP/2 issue of some kind with some versions of curl or git"

Try and see if updating curl/git on the server side, and Git on the client side would be enough.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks. That works, but I'm looking for a server side solution. That command is just a workaround and doesn't address the root problem. – Jesse Shieh Mar 02 '20 at 15:40
  • 1
    @JesseShieh Yes: "server side": by upgrading Git and curl on the *server*, you might check if that is enough to solve the issue. – VonC Mar 02 '20 at 15:45
  • I tried upgrading apache and git on the server, but not curl. I don't think curl on the server is used in this case. – Jesse Shieh Mar 02 '20 at 19:21