gnutls_handshake()失败:pull函数中的错误

Thả*_*inh 2 git

使用git pull命令时出现错误

fatal: unable to access 'https://github.com/path/to/repo.git/': gnutls_handshake() failed: Error in the pull function.
Run Code Online (Sandbox Code Playgroud)

我尝试了许多来自Internet的方法,但是它们没有用。另外,尝试处理我网络中的代理。

我的电脑:Ubuntu 16.04 LTS x86_64

有没有解决问题的有效方法?

注意:有一些解决方案https://devopscube.com/gnutls-handshake-failed-aws-codecommit/https://askubuntu.com/questions/186847/error-gnutls-handshake-failed-when-connecting-到https服务器,但在我的情况下不起作用。

har*_*ugh 19

我解决了这个问题 -

 apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
Run Code Online (Sandbox Code Playgroud)

  • 你能再解释一下吗? (4认同)
  • 显然问题出在libssl上,因为我安装了`libssl-dev`后,问题就解决了。在此之前,我有“libssl1.0-dev”。 (3认同)

小智 6

我在 Windows-WSL2/Ubuntu 中使用 git 逐字收到相同的错误

就我而言,当我断开公司 VPN 连接并立即成功恢复使用 git 时,问题得到了解决。

为了验证这是因果关系而不是相关性,我重新连接到 VPN 并再次尝试,但它再次中断;然后第二次放弃了 VPN - 瞧,它奏效了

希望能帮助到那里的人!


Cri*_*eda 5

我的服务器位于代理后面,并且出现相同的错误,我解决了这个修改〜/ .gitconfig并添加代理conf的问题:

[http]
    proxy = http://xxx.xxx.xxx.xxx:pppp
Run Code Online (Sandbox Code Playgroud)