nvm
nvm copied to clipboard
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash - Error : SSL certificate problem: unable to get local issuer certificate
Operating system and version:
Windows 10
nvm debug
output:
% 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: unable to get local issuer certificate
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.
nvm ls
output:
How did you install nvm
?
What steps did you perform?
Executing command - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
What happened?
Getting the following error: curl: (60) SSL certificate problem: unable to get local issuer certificate
What did you expect to happen?
Install NVM
Is there anything in any of your profile files that modifies the PATH
?
If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/
print out?
* Trying 104.20.22.46:443...
* TCP_NODELAY set
* Connected to nodejs.org (104.20.22.46) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=*.nodejs.org
* start date: Jan 11 00:00:00 2022 GMT
* expire date: Feb 11 23:59:59 2023 GMT
* subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x556826d1c7c0)
> HEAD /dist/ HTTP/2
> Host: nodejs.org
> user-agent: curl/7.68.0
> accept: */*
> accept-encoding: deflate, gzip, br
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200
HTTP/2 200
< date: Fri, 04 Nov 2022 16:16:15 GMT
date: Fri, 04 Nov 2022 16:16:15 GMT
< content-type: text/html
content-type: text/html
< cache-control: max-age=14400
cache-control: max-age=14400
< cf-cache-status: HIT
cf-cache-status: HIT
< age: 11469
age: 11469
< last-modified: Fri, 04 Nov 2022 13:05:06 GMT
last-modified: Fri, 04 Nov 2022 13:05:06 GMT
< vary: Accept-Encoding
vary: Accept-Encoding
< strict-transport-security: max-age=31536000; includeSubDomains; preload
strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-content-type-options: nosniff
x-content-type-options: nosniff
< server: cloudflare
server: cloudflare
< cf-ray: 764ea7314cc9e6b0-EWR
cf-ray: 764ea7314cc9e6b0-EWR
< content-encoding: br
content-encoding: br
<
* Connection #0 to host nodejs.org left intact
Please fill out the entire issue template; in particular, the last question helps debug SSL issues.
Also, I see you're on windows - are you using cygwin, git bash, or WSL?
Updated the issues with the required details.
I am using WSL in Visual Studio Code.
The implication is that you have something performing a man-in-the-middle attack on Github. Do you have a firewall or proxy between you and github?
Yes. Firewall is enabled.
Try disabling it and see if that fixes it - although usually a firewall won't break outbound traffic.
I cannot disable it. Is there any alternative available.
If your machine can't connect to github then I'm not sure what could help. I'm skeptical the firewall is the problem, of course. If you're connecting through an employer, school, or country that interferes with free access to the internet, they might be messing with access to github?
It is my office laptop.
In that case, I'd ask your employer's IT department to check into it - you can reproduce it with curl -I --compressed -v https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh
, I assume?
are you able to get a response from ping google.com
and ping 8.8.8.8
in wsl?
Hi. I am using Ubuntu 22.04 in windows using wsl.
I am facing same issue. Even I tried installing using compressed version using the command curl -I --compressed -v https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh
Below is the error that I get
Any suggestions would be helpful
@kaviii try v0.39.3, and make sure you're in WSL2.
@ljharb I am using wsl2. Tried with v0.39.3 but still getting the same error.
are you able to run ping goolge.com
yes, ping google.com
is working fine.
@kaviii since you're getting that error with curl, it's got nothing to do with nvm - it's a problem with your computer, and its networking settings, clock, SSL CA certificates, or something else.
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.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:00:21 --:--:-- 0 curl: (28) Failed to connect to raw.githubusercontent.com port 443 after 21407 ms: Couldn't connect to server
@kaviii, try this:
apt-get update
apt-get install -y ca-certificates
Do you use zscaler or some other cert proxy in your company? This honestly is really not an issue with nvm per se