Kazuaki Suzuki
Kazuaki Suzuki

Reputation: 1075

curl: (60) SSL certificate problem: self signed certificate

I would like to install nvm on my Linux computer. (My Debian version is 10.)

I read this document https://github.com/nvm-sh/nvm#install--update-script and I input this 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. Therefore, I searched the Internet and found that I need proxy configuration.

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.

How can can I resolve this problem?

Upvotes: 2

Views: 8008

Answers (1)

VonC
VonC

Reputation: 1326736

found that I need proxy configuration.

Check first if you did need any proxy before that call.
For instance (without proxy exported):

curl -Is http://www.google.com | head -1 | grep 200; if [[ $? -eq 0 ]]; then; echo "Online"; else; echo "Offline"; fi

If that works, then the issue is different.
If not, try again with your proxy in place.

Upvotes: 1

Related Questions