gpt4 book ai didi

git - 如何解决[curl : (60) SSL certificate problem: self signed certificate in certificate chain]

转载 作者:行者123 更新时间:2023-12-05 06:16:11 84 4
gpt4 key购买 nike

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

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

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

这是结果。

 % 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但我不知道该怎么办。于是上网搜索了一下,发现需要代理配置。

export http_proxy="http://webfilter.**********.com:8000/"
export https_proxy="http://webfilter.**********.com:8000/"

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

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

然后我得到相同的结果。

  % 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.

接下来,我将此命令放入我的终端

curl -Is http://www.google.com | head -1 | grep 200

我明白了

HTTP/1.1 200 OK

这意味着我不需要代理。

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

github: server certificate verification failed

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

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

我该如何解决这个问题?

最佳答案

你试过这种方法吗?

curl -k https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh

为了清楚起见,阅读 man curl

关于git - 如何解决[curl : (60) SSL certificate problem: self signed certificate in certificate chain],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62185514/

84 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com