您可以帮助我安装 sdkman。当我进入控制台时"curl -s "https://get.sdkman.io" | bash"
,什么也没有发生...
我试过"curl -sv "https://get.sdkman.io" | bash"
Rebuilt URL to: https://get.sdkman.io/
Trying 159.89.187.78...
Connected to get.sdkman.io (159.89.187.78) port 443 (#0)
found 148 certificates in /etc/ssl/certs/ca-certificates.crt
found 597 certificates in /etc/ssl/certs
ALPN, offering http/1.1
gnutls_handshake() failed: Error in the push function.
Closing connection 0
答案1
# host get.sdkman.io
get.sdkman.io has address 159.89.187.78
IP 159.89.187.78 已列入 Roscomnadzor 黑名单。您可以检查一下:
答案2
如果您来这里是为了寻找另一种涉及 WSL 的解决方案以及由您的 ISP 强制执行的 DNS 名称服务器和搜索域的更改。解决方案如下:
问题:与 OP 中的错误相同
$ curl https://registry.terraform.io/
curl: (35) gnutls_handshake() failed: Error in the push function.
根本原因:我正在使用一台 WSL 机器,它从我的 ISP WIFI 路由器(在加拿大)获取所有 DNS 配置
cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 64.71.255.204
nameserver 64.71.255.198
nameserver 2607:f798:18:10:0:640:7125:5204
search phub.net.cable.rogers.com
解决方案: 评论所有内容并添加 Google 的名称服务器
cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
#search phub.net.cable.rogers.com
nameserver 8.8.8.8
nameserver 8.4.4.8
更改之后,不要忘记强制 resolv.conf 不变。
sudo chattr -f +i etc/resolv.conf
测试
$ curl https://registry.terraform.io/
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Terraform Registry</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
...
</noscript>
</body>
</html>
干杯。