Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GnuTLS recv error (-110): The TLS connection was non-properly terminated

Tags:

git

vim

ssh

vundle

I'm preparing to install vim plugin by vundle, after I set the vimrc

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

Plugin 'gmarik/Vundle.vim'
Plugin 'valloric/youcompleteme'

call vundle#end()

then I input :PluginInstall and get the error

  2 [2018-09-27 10:47:17] Plugin valloric/youcompleteme                                                | 18 " line enables syntax highlighting by default.
  3 [2018-09-27 10:47:17] $ git clone --recursive 'https://github.com/valloric/youcompleteme.git' '/roo| 19 syntax on;
    t/.vim/bundle/youcompleteme'                                                                       | 20 if has("syntax")
  4 [2018-09-27 10:47:17] > Cloning into '/root/.vim/bundle/youcompleteme'...                          | 21   syntax on
  5 [2018-09-27 10:47:17] > error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was| 22 endif
     non-properly terminated. 

and then I go to the directory ~/.vim/bundle and execute

git clone --recursive 'https://github.com/valloric/youcompleteme.git

and get this

Cloning into '~/.vim/bundle/youcompleteme'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 34431 (delta 4), reused 8 (delta 1), pack-reused 34416
Receiving objects: 100% (34431/34431), 32.58 MiB | 2.37 MiB/s, done.
error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
Resolving deltas: 100% (12305/12305), done.

As this said, It seems the plugin have been downloaded despite the error. But I can't find the youcompleteme directory in fact.

I also try

git clone --recursive '[email protected]:Valloric/YouCompleteMe.git' '~/.vim/bundle/youcompleteme'

and get this

Cloning into '~/.vim/bundle/youcompleteme'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.

So how to solve this?

like image 850
G.yx Avatar asked Sep 27 '18 04:09

G.yx


3 Answers

For anyone who may encounter the issue below on windows 10 wsl2 can fix with a following reference:

fakeroot, while creating message channels: Function not implemented
This may be due to a lack of SYSV IPC support. 

https://github.com/microsoft/WSL/issues/2465#issuecomment-377583291

sudo update-alternatives --set fakeroot /usr/bin/fakeroot-tcp
like image 78
Cary Yu Avatar answered Oct 01 '22 10:10

Cary Yu


Recompile and install git solve it finally, the steps are the following:

sudo apt-get install build-essential fakeroot dpkg-dev -y
sudo apt-get build-dep git -y
sudo apt-get install libcurl4-openssl-dev -y
cd ~
mkdir source-git
cd source-git/
apt-get source git
cd git-2.*.*/
sed -i -- 's/libcurl4-gnutls-dev/libcurl4-openssl-dev/' ./debian/control
sed -i -- '/TEST\s*=\s*test/d' ./debian/rules
dpkg-buildpackage -rfakeroot -b -uc -us
sudo dpkg -i ../git_*ubuntu*.deb

And not use -y is ok, -y just for skip inputting y. The result is:

Cloning into 'syntastic'...
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 18671 (delta 9), reused 16 (delta 5), pack-reused 18644
Receiving objects: 100% (18671/18671), 4.26 MiB | 701.00 KiB/s, done.
Resolving deltas: 100% (10572/10572), done.
Checking connectivity... done.
like image 25
G.yx Avatar answered Oct 01 '22 10:10

G.yx


So how to solve this?

By checking if those errors persist during the next few hours.

GitHub status reports right now

We are investigating reports of elevated error rates.

And this could be a side-effect of their issues.

The other approach is making sure you are using the latest Git release, which the OP did by recompiling Git.

like image 22
VonC Avatar answered Oct 01 '22 10:10

VonC