git clone: GnuTLS recv error (-9): A TLS packet with unexpected length was received

I’m trying to clone a git repository and I’m receiving following error while executing the command:

GnuTLS recv error (-9): A TLS packet with unexpected length was received.

My client machine is a Ubuntu 14.04.

  • Git log explained
  • Connecting to GitLab repositories on Android Studio
  • strange output during git merge
  • Why do so many projects prepend “v” to the git version tags?
  • Git force push to github rejected for large file that is deleted and no longer tracked
  • Git refuses to reset/discard files
  • git pull very slow (not the ssh transfer part) on Windows 2003 server
  • Add multiple project in one repository Github
  • Checking in and out files within branches without moving to the Master Branch
  • Git-ignore certain files in sub-directories, but not all
  • Rename origin to default (git)
  • Bash function to find all Git commits in which a file (whose name matches a regex) has *changed*
  • 2 Solutions collect form web for “git clone: GnuTLS recv error (-9): A TLS packet with unexpected length was received”

    This is Known bug as @Ivan Ternovtsiy said ,but there is workaround

    Remove current GIT from your system

     sudo apt-get purge git
    

    Download GIT deb git_1.9.1-1_amd64.deb link

    Execute the downloaded DEB.

    If you are in china,may be you should set proxy for git,for example

    git config --global https.proxy 'socks5://127.0.0.1:9999'
    
    Git Baby is a git and github fan, let's start git clone.