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

  • Any Git shortcuts for the current branch and the branch it tracks?
  • git show-branch and trying to fix / figure out what is going on
  • Undoing 'git reset <sha>'
  • Possible to run git-annex on windows?
  • If I change the name of a file, do I need to remove the old and add the new?
  • List commits and files changed under commit
  • 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 ).

  • git archive preserve time
  • Automatically cache git credentials from a Windows batch script?
  • Confused on git workflow (PHP/MySQL)
  • Git LFS skipped files
  • How can sbt pull dependency artifacts from git?
  • How do I stop Git from tracking any changes to a file from this commit forward?
  • 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.