Can I force git to use TLS only?

When I use git under a specific network environment, it will send out SSL packet rather than TLS one, and says “gnutls_hanshake() failed(): A TLS packet with unexpected length was receive” . This is the only difference I can discover from the WireShark logs between them:

The SUCCESS result

  • Git push takes forever
  • Gerrit remove Need Verified +1 (Verified)
  • Right way to share a git repo over ssh
  • Why does this series of git-svn commands result in a detached HEAD?
  • Maintain different directory structure in different git branches
  • Setting up jenkins on centos: problems with ssh keys and git
  • enter image description here

    The FAILED result

    enter image description here

    I’m using Ubuntu 12.04, x86-64 version. And this problem appeared also on MacBook and 11.10 problem. But when I try with Win7 and Git Gui, it got no errors.

    And if I switch to other network environments, like pppoe in my home, or the WiFi in some cafe, the problem disappeared with my Ubuntu 12.04 ( same settings, same OS ).

    Please help me to know what can I do. At least if I have to argue this problem with my MIS, I can figure out why this shouldn’t happen.

    Thanks !

    PS.1. I have tried the solution listed in ask Ubuntu, but it didn’t work.

    PS.2. Filezilla seemed had this problem, too. But I can’t find how they solve the problem ( and apply to git ).

  • Concurrency in a GIT repo on a network shared folder
  • how do I get git to show me which branches are tracking what?
  • git deploy subfolder of repository
  • Cannot change a file to untracked
  • Generating online books
  • Log of remote history
  • One Solution collect form web for “Can I force git to use TLS only?”

    Git uses libcurl for HTTP connections.

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

    Git Baby is a git and github fan, let's start git clone.