I hope you have a nice day, for about a month now, every time I connect to an instance through Visual Studio, I get this message:

Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

enter image description here

So far I have not found a solution to this. I look forward to your comments and any help is welcome. Regards!

1 Answer 1


Since it's a warning and not an error, it doesn't need to be fixed, but...

This is a warning thrown by node.js (which shouldn't be a surprise). I'm not sure if the standalone installer for sfdx includes node.js or not, but at any rate you have node.js and sfdx is using it.

NODE_TLS_REJECT_UNAUTHORIZED is an environment variable (again, this shouldn't be a surprise, given the warning message). Having it set to 0 means that node.js is not verifying that the SSL/TLS certificates have a proper and unbroken path up to a trusted "root" certificate (again, the warning says this, so it shouldn't be a surprise).

Typically, you'd set this environment variable to '0' if your employer is using a proxy or has installed their own "root certificate" so they can decrypt your https traffic (which as I understand is fairly common practice).

If you are in that situation, then having NODE_TLS_REJECT_UNAUTHORIZED set to 0 is the easiest way to work around it.

If you aren't behind a proxy or have a company root cert installed, then getting rid of this warning is as simple as setting NODE_TLS_REJECT_UNAUTHORIZED to 1.

From https://stackoverflow.com/questions/68592669/how-to-set-value-for-node-tls-reject-unauthorized-0-in-mac

  • That's right, as you mention it is a warning. I did not find where to modify the variable but when I checked on another PC it did not show the message and that I connected to the same sandbox. Greetings!!! Nov 28, 2022 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .