GnuTLS 接收错误 (-110):TLS 连接未正确终止
GnuTLS recv error (-110): The TLS connection was non-properly terminated
我准备通过 vundle 安装 vim plugin,在我设置 vimrc
之后
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'valloric/youcompleteme'
call vundle#end()
然后我输入:PluginInstall
并得到错误
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.
然后我进入目录~/.vim/bundle
并执行
git clone --recursive 'https://github.com/valloric/youcompleteme.git
得到这个
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.
正如所说,尽管出现错误,但似乎插件已下载。但实际上我找不到youcompleteme
目录。
我也试试
git clone --recursive 'git@github.com:Valloric/YouCompleteMe.git' '~/.vim/bundle/youcompleteme'
得到这个
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?
通过检查这些错误在接下来的几个小时内是否仍然存在。
GitHub status 立即报告
We are investigating reports of elevated error rates.
这可能是他们问题的副作用。
另一种方法是确保您使用的是最新的 Git 版本,OP 通过重新编译 Git。
重新编译安装git终于解决了,步骤如下:
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
不使用-y
也可以,-y
只是为了跳过输入y
。结果是:
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.
出于某种原因 'git pull' 一遍又一遍地发出此消息,但 'git pull origin master' 有效
对于 windows 10 wsl2 可能遇到以下问题的任何人,可以通过以下参考进行修复:
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
当 运行 来自 Visual Studio 的 CMake 和 Ubuntu 18.04 的 WSL 时,我找到了另一种解决此问题的方法。
我在这里找到了将 GIT 升级到最新版本的另一种方法:https://itsfoss.com/install-git-ubuntu/
sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt install git
即使我们在升级后仍然有 GnuTLS recv 错误 (-110),GIT 操作不会再失败。
这里有一种更 up-to-date 的方法。我在 Win10 上的 WSL2 上使用 Ubuntu 20.04。
sudo apt remove git -y
sudo apt update && sudo apt upgrade
DEBIAN_FRONTEND=noninteractive
sudo apt install build-essential autoconf dh-autoreconf libcurl4-openssl-dev \
tcl-dev gettext asciidoc docbook2x install-info \
libexpat1-dev libz-dev -y
wget https://raw.githubusercontent.com/paul-nelson-baker/git-openssl-shellscript/master/compile-git-with-openssl.sh .
./compile-git-with-openssl.sh -skiptests
我准备通过 vundle 安装 vim plugin,在我设置 vimrc
之后set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'valloric/youcompleteme'
call vundle#end()
然后我输入:PluginInstall
并得到错误
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.
然后我进入目录~/.vim/bundle
并执行
git clone --recursive 'https://github.com/valloric/youcompleteme.git
得到这个
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.
正如youcompleteme
目录。
我也试试
git clone --recursive 'git@github.com:Valloric/YouCompleteMe.git' '~/.vim/bundle/youcompleteme'
得到这个
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?
通过检查这些错误在接下来的几个小时内是否仍然存在。
GitHub status 立即报告
We are investigating reports of elevated error rates.
这可能是他们问题的副作用。
另一种方法是确保您使用的是最新的 Git 版本,OP 通过重新编译 Git。
重新编译安装git终于解决了,步骤如下:
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
不使用-y
也可以,-y
只是为了跳过输入y
。结果是:
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.
出于某种原因 'git pull' 一遍又一遍地发出此消息,但 'git pull origin master' 有效
对于 windows 10 wsl2 可能遇到以下问题的任何人,可以通过以下参考进行修复:
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
当 运行 来自 Visual Studio 的 CMake 和 Ubuntu 18.04 的 WSL 时,我找到了另一种解决此问题的方法。 我在这里找到了将 GIT 升级到最新版本的另一种方法:https://itsfoss.com/install-git-ubuntu/
sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt install git
即使我们在升级后仍然有 GnuTLS recv 错误 (-110),GIT 操作不会再失败。
这里有一种更 up-to-date 的方法。我在 Win10 上的 WSL2 上使用 Ubuntu 20.04。
sudo apt remove git -y
sudo apt update && sudo apt upgrade
DEBIAN_FRONTEND=noninteractive
sudo apt install build-essential autoconf dh-autoreconf libcurl4-openssl-dev \
tcl-dev gettext asciidoc docbook2x install-info \
libexpat1-dev libz-dev -y
wget https://raw.githubusercontent.com/paul-nelson-baker/git-openssl-shellscript/master/compile-git-with-openssl.sh .
./compile-git-with-openssl.sh -skiptests