[英]How to solve [curl: (60) SSL certificate problem: self signed certificate in certificate chain]
I would like to install nvm on my Linux computer.我想在我的 Linux 计算机上安装 nvm。 (My Debian version is 10, Git version is 2.27. and OPENSSL version is 1.1.1d 10 Sep 2019) (我的 Debian 版本是 10,Git 版本是 2.27。OPENSSL 版本是 1.1.1d 2019 年 9 月 10 日)
I read this document https://github.com/nvm-sh/nvm#install--update-script and I input this script.我阅读了这份文件https://github.com/nvm-sh/nvm#install--update-script并输入了这个脚本。
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
This is the result.这是结果。
% 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.
I read this document https://curl.haxx.se/docs/sslcerts.html but I could not understand what to do.我阅读了这份文件https://curl.haxx.se/docs/sslcerts.html但我不明白该怎么做。 Therefore, I searched the Inte.net and found that I need proxy configuration.因此,我搜索了Inte.net,发现我需要代理配置。
export http_proxy="http://webfilter.**********.com:8000/"
export https_proxy="http://webfilter.**********.com:8000/"
I entered these commands in my terminal and tried this script again.我在我的终端中输入了这些命令并再次尝试了这个脚本。
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Then I get the same result.然后我得到相同的结果。
% 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.
Next, I put this command in my terminal接下来,我将此命令放入我的终端
curl -Is http://www.google.com | head -1 | grep 200
and I get我得到
HTTP/1.1 200 OK
That means I don't need proxy in my case.这意味着我不需要代理。
Next, I tried this solution.接下来,我尝试了这个解决方案。
github: server certificate verification failed github:服务器证书验证失败
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
I have done all these command and tried again, but got the same error message.我已经完成了所有这些命令并再次尝试,但得到了相同的错误消息。
How can can I resolve this problem?我该如何解决这个问题?
Have you tried this way?你试过这种方法吗?
curl -k https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
Read man curl for clarity为了清楚起见,请阅读 man curl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.