git报错 failed: The TLS connection was non-properly terminated
腾讯云主机不知道为什么不能git clone,报错:fatal: unable to access 'https://github.com/asdf-vm/asdf-plugins.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.plugin ruby not found in rep
腾讯云主机不知道为什么不能git clone,报错:
fatal: unable to access 'https://github.com/asdf-vm/asdf-plugins.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
plugin ruby not found in repository
查了下需要使用libcurl4-openssl-dev替换gnutls对git进行编译。
sudo apt-get install build-essential fakeroot dpkg-dev
mkdir ~/git-openssl
cd ~/git-openssl
sudo apt-get source git
sudo apt-get build-dep git
如果出现找不到源代码的报错,使用命令sudo vim /etc/apt/sources.list打开文件并取消带deb_src那一行的注释,保存后运行sudo apt update,然后再执行上面最后一条命令
接着:
sudo apt-get install libcurl4-openssl-dev
sudo dpkg-source -x git_2.17.1-1ubuntu0.9.dsc
cd git_2.17.1 #实际版本可能不同
然后编辑文件debian/control,使用命令sudo vim deebian/control,将全部的libcurl4-gnutls-dev改为libcurl4-openssl-dev 。(我这里只遇见了一个libcurl4-gnutls-dev)
接着运行命令:
#这一步时间会很长,耐心等待
sudo dpkg-buildpackage -rfakeroot -b
sudo dpkg -i git_2.17.1-1ubuntu0.9_amd64.deb
到这里就结束了,再次git就可以了
+ git clone https://github.com/asdf-vm/asdf.git /root/.asdf --depth 1
Cloning into '/root/.asdf'...
+ echo -e '\n. $HOME/.asdf/asdf.sh'
+ echo -e '\n. $HOME/.asdf/completions/asdf.bash'
+ echo -e 'legacy_version_file = yes'
+ asdf plugin-add ruby
initializing plugin repository...Cloning into '/root/.asdf/repository'...
------------------------------------------------------------------------------------更新
下午又重新搞了一次还是有相同的问题,最后重置代理 完美解决
git config --global --unset https.https://github.com.proxy
git config --global --unset http.https://github.com.proxy
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)