Aru*_*pal 19 git github ubuntu-10.04
我尝试克隆git存储库时出现以下错误.我也正确配置了rsa公钥.
$ git clone https://github.com/blah/blah.git
Initialized empty Git repository in /home/arun/.git/
error: gnutls_handshake() failed: A TLS packet with unexpected length was
received. while accessing https://github.com/blah/blah.git/info/refs
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
它可以用于GnuTL或pycurl bug
以下是pycurl_7.19.0-4ubuntu3的新方法:
sudo apt-get install build-essential fakeroot dpkg-dev
mkdir ~/python-pycurl-openssl
cd ~/python-pycurl-openssl
sudo apt-get source python-pycurl
sudo apt-get build-dep python-pycurl
sudo apt-get install libcurl4-openssl-dev
sudo dpkg-source -x pycurl_7.19.0-4ubuntu3.dsc
cd pycurl-7.19.0
# remove the HAVE_CURL_GNUTLS=1 in the following file
sudo vim debian/patches/10_setup.py.dpatch
# remove the HAVE_CURL_GNUTLS=1 in the following file
sudo vim setup.py
# replace all gnutls into openssl in the following file
sudo vim debian/control
sudo dpkg-buildpackage -rfakeroot -b
sudo dpkg -i ../python-pycurl_7.19.0-4ubuntu3_amd64.deb
Run Code Online (Sandbox Code Playgroud)
我有这个问题,我花了一段时间才找到解决方案.我一直以为我在某个地方错过了一个包裹.我不想重新编译Git,因为我已经在使用最新版本了,我很确定问题不是Git本身.
我的问题是我的.gitconfig档案.问题只发生在多年来多次升级的旧Linux服务器上.在某些时候,由于某些原因我不记得了,我已经sslVersion = sslv3在我的.gitconfig文件中明确指定了.
当我看到它时,灯泡继续,因为我知道SSL V3因安全问题而被弃用,并且大多数人应该使用TLS.例如,请参阅RFC 7568,https: //tools.ietf.org/html/rfc7568
所以我的修复涉及sslVersion = sslv3从我的~/.gitconfig文件中删除违规行,或更改此:
[httpd]
sslVersion = sslv3
Run Code Online (Sandbox Code Playgroud)
对此:
[httpd]
sslVersion = tlsv1.2
Run Code Online (Sandbox Code Playgroud)
删除该行并让Git/libcurl协商加密似乎是最好的选择,因为TLS v1.3正在开发中,我不希望将来再次遇到这个问题!
就我而言,看来我没有使用 pycurl,所以上述解决方案对我不起作用。所做的工作是重建 git-core,修改为使用 openssl 而不是 gnutls。
说明在这里:
https://askubuntu.com/questions/186847/error-gnutls-handshake-falied
我在大多数地方用“git-core”替换了“git”,.dsc(包信息文件?)出现为 git-core_1.7.0.4-1ubuntu0.2.dsc,.deb 包出现为git-core_1.7.0.4-1ubuntu0.2_i386.deb。
| 归档时间: |
|
| 查看次数: |
50512 次 |
| 最近记录: |