Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request error, reason: self signed certificate in certificate chain #2794

Closed
opossamai opened this issue Jan 30, 2023 · 6 comments
Closed

Request error, reason: self signed certificate in certificate chain #2794

opossamai opened this issue Jan 30, 2023 · 6 comments

Comments

@opossamai
Copy link

Hi there!
I'm getting this error message when trying to install a new version of nodejs.
I'm using the command line:
C:\nodejs\v16.17.1\node_modules\yarn\bin\yarn.js --cwd C:\agent\_work\1\s\src\Radar\NovaInterfaceRadar\cpp install --force

When try to request https://nodejs.org/download/release/v16.17.1/node-v16.17.1-headers.tar.gz, have the failed in the title.

This is running in a company network, with robust firewalls.

I already have the certificate authority to this self signed certificate in the trusted CA of the machine.

I tried using the NODE_TLS_REJECT_UNAUTHORIZED=0 variable and the strict-ssl false, but it's still not working.

It looks like node-gyp is not finding the machine's certificate settings.

Enviroment:
Windows 10 Professional 6.3

yarn install v1.22.19
warning package.json: No license field
info No lockfile found.
warning [email protected]: No license field
[1/4] Resolving packages...
(node:3464) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
warning node-gyp > make-fetch-happen > cacache > @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Rebuilding all packages...
success Saved lockfile.
$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info find Python using Python version 3.7.2 found at "C:\Program Files (x86)\Python37-32\python.exe"
gyp http GET https://nodejs.org/download/release/v16.17.1/node-v16.17.1-headers.tar.gz
(node:1580) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v16.17.1/node-v16.17.1-headers.tar.gz failed, reason: self signed certificate in certificate chain
gyp ERR! stack     at ClientRequest.<anonymous> (C:\agent\_work\1\s\src\Radar\NovaInterfaceRadar\cpp\node_modules\minipass-fetch\lib\index.js:130:14)
gyp ERR! stack     at ClientRequest.emit (node:events:513:28)
gyp ERR! stack     at TLSSocket.socketErrorListener (node:_http_client:481:9)
gyp ERR! stack     at TLSSocket.emit (node:events:525:35)
gyp ERR! stack     at emitErrorNT (node:internal/streams/destroy:157:8)
gyp ERR! stack     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\nodejs\\v16.17.1\\node.exe" "C:\\agent\\_work\\1\\s\\src\\Radar\\NovaInterfaceRadar\\cpp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\agent\_work\1\s\src\Radar\NovaInterfaceRadar\cpp
gyp ERR! node -v v16.17.1
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok 
@jjg05s
Copy link

jjg05s commented Mar 21, 2023

I have the same issue on macOS 11.6.8. Is there anyone looking into this?

@arontsang
Copy link

@jjg05s No one is looking into this at all
#2663

@cclauss
Copy link
Contributor

cclauss commented Jul 5, 2023

#695 (comment)

@alecxis
Copy link

alecxis commented Jul 11, 2024

Try setting SASS_REJECT_UNAUTHORIZED to false

@StefanStojanovic
Copy link
Contributor

The fix is given in the comments. Also, it has been stale for some time. I'll close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants