在获取Fuchsia时,gnutls_handshake()失败(TLS连接未正确终止)。

4

我正在尝试获取谷歌Fuchsia源代码,但我一直遇到很多这样的错误:

ERROR: 'git fetch -p origin' failed:
stdout:
stderr:
fatal: unable to access 'https://fuchsia.googlesource.com/third_party/github.com/google/cppdap/':
gnutls_handshake() failed: The TLS connection was non-properly terminated.
command fail error: exit status 128


作为结果,下载从未完全完成,我只有一个不完整的Fuchsia存储库克隆。
我知道我的Git安装没问题,因为我可以正常访问GitHub存储库(我经常这样做)。
我在WSL2上(Ubuntu 20.04 LTS)。
我该如何解决这个错误?
4个回答

11

我在Ubuntu中禁用了sslVerify。并尝试克隆Git。它可以正常工作。

git config --global http.sslVerify false

0
如果您仍然遇到此错误,首先建议从docs验证当前有效的URL。
curl -s "https://fuchsia.googlesource.com/fuchsia/+/HEAD/scripts/bootstrap?format=TEXT" | base64 --decode | bash

然后尝试使用--ipv4强制使用IPv4或按照答案中所述更新curl

apt-get update

apt-get install curl

0
在我的情况下,问题是https代理变量的值不正确。 https代理变量(https_proxy)使用了https,而应该使用http。
# WRONG:
https_proxy=https://<proxy-url>

# CORRECT
https_proxy=http://<proxy-url>

-1

你可以尝试:

sudo git clean -i

这解决了我的问题,对于以下错误:

git pull --tags origin main fatal: unable to access 'https:_git_repo_i_cant_reach _': gnutls_handshake() failed: Error in the pull function.


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接