Can I force git to use only TLS?

When I use git in a specific network environment, it will send an SSL packet, not TLS, and says " gnutls_hanshake() failed(): A TLS packet with unexpected length was receive ". This is the only difference I can find from WireShark logs between them:

Result SUCCESS

enter image description here

FAILED Result

enter image description here

I am using Ubuntu version 12.04, x86-64. And this problem appeared in the MacBook and 11.10. But when I try with Win7 and git Gui, it had no errors.

And if I switch to other network environments, such as pppoe in my house or WiFi in some cafe, the problem disappeared from my Ubuntu 12.04 (the same settings, the same OS).

Please help me find out what I can do. At least if I have to discuss this issue with my MIS, I can understand why this should not be.

Thanks!

PS.1. I tried the solution indicated in request Ubuntu , but that did not work.

PS.2. Filezilla also had this problem . But I can not find how they solve the problem (and apply to git).

+4
source share
1 answer

Git uses libcurl for HTTP connections.

I am not aware of any runtime configuration (which it may have), but you can modify Git itself to force it to use only TLS connections. Checkout http.c. The libcurl function for this purpose should be curl_easy_setopt with the argument CURLOPT_SSLVERSION with CURL_SSLVERSION_TLSv1.

0
source

All Articles