首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何解决[curl:(60) SSL证书问题:证书链中的自签名证书]

如何解决[curl:(60) SSL证书问题:证书链中的自签名证书]
EN

Stack Overflow用户
提问于 2020-06-04 01:42:43
回答 1查看 11.6K关注 0票数 3

我想在我的Linux计算机上安装nvm。(我的Debian版本是10,Git版本是2.27。OPENSSL版本为1.1.1d 2019年9月10日)

我阅读了这个文档https://github.com/nvm-sh/nvm#install--update-script并输入了这个脚本。

代码语言:javascript
运行
复制
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

这就是结果。

代码语言:javascript
运行
复制
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

我读了这个文档https://curl.haxx.se/docs/sslcerts.html,但我不知道该做什么。因此,我在互联网上搜索,发现我需要代理配置。

代码语言:javascript
运行
复制
export http_proxy="http://webfilter.**********.com:8000/"
export https_proxy="http://webfilter.**********.com:8000/"

我在终端中输入了这些命令,并再次尝试了这个脚本。

代码语言:javascript
运行
复制
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

然后我得到了同样的结果。

代码语言:javascript
运行
复制
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

接下来,我将这个命令放在我的终端中。

代码语言:javascript
运行
复制
curl -Is http://www.google.com | head -1 | grep 200

我得到了

代码语言:javascript
运行
复制
HTTP/1.1 200 OK

这意味着我的案子不需要代理。

接下来,我尝试了这个解决方案。

github: server certificate verification failed

代码语言:javascript
运行
复制
sudo apt-get install --reinstall ca-certificates
sudo mkdir /usr/local/share/ca-certificates/cacert.org
sudo wget -P /usr/local/share/ca-certificates/cacert.org http://www.cacert.org/certs/root.crt http://www.cacert.org/certs/class3.crt
sudo update-ca-certificates
git config --global http.sslCAinfo /etc/ssl/certs/ca-certificates.crt

我已经执行了所有这些命令,并再次尝试,但是得到了相同的错误消息。

我怎样才能解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2022-10-24 15:43:07

你试过这样做吗?

代码语言:javascript
运行
复制
curl -k https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh

读人卷曲以求清晰

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62185514

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档