git通过https访问仓库遇到error: gnutls_handshake() failed问题

 fatal: unable to access 'https://github.com/espressif/esp-idf.git/': gnutls_handshake() failed: A TLS packet with unexpected length was received.

sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
sudo apt-get source git
sudo dpkg-source -x git_1.9.2-1.dsc
cd git-1.9.2
#注意上面的1.9.2要按照你自己的版本文件名进行修改
vi debian/control
找到libcurl4-gnutls-dev,替换为libcurl4-openssl-dev
sudo dpkg-buildpackage -rfakeroot -b
如果fail on test,可以将文件debian/rules中的TEST=test注释掉
最后sudo dpkg -i ../git_1.9.2-1_amd64.deb安装git即可。


未满足的构建依赖关系: libcurl4-openssl-dev
需再次安装 sudo apt-get libcurl4-openssl-dev

 Git bash Unknown SSL protocol error in connection to github.com:443

git config http.sslVerify "false"

不行多试几次,就可以了.

posted @ 2019-09-10 10:32  jie_liu2  阅读(10080)  评论(0编辑  收藏  举报