+ Start a Discussion
Prakash Rai 7Prakash Rai 7 

SELF_SIGNED_CERT_IN_CHAIN

Hi,
I get this error for 'sfdx force:org:list` or for any 'sfdx` command. I re-installed node, npm and sfdx cli without luck. My workaround is `export NODE_TLS_REJECT_UNAUTHORIZED=0` that is not ideal. Any suggestion?

Also `npm config ls -l` lists `cafile = "/etc/ssl/certs/xxxxxCA.pem` that does exist. 

Error: self signed certificate in certificate chain
    at TLSSocket.onConnectSecure (_tls_wrap.js:1497:34)
    at TLSSocket.emit (events.js:315:20)
    at TLSSocket._finishInit (_tls_wrap.js:932:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12) {
  code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
VinayVinay (Salesforce Developers) 
Check below references that can give more details of above error.

https://medium.com/@jonatascastro12/understanding-self-signed-certificate-in-chain-issues-on-node-js-npm-git-and-other-applications-ad88547e7028
https://stackoverflow.com/questions/45088006/nodejs-error-self-signed-certificate-in-certificate-chain

Thanks,
Prakash Rai 7Prakash Rai 7
It happes to be the Netskope Client that was messing up the sfdx communication. I got it working fine now.
Pradeep Kalyan LankePradeep Kalyan Lanke
@prakash would you mind sharing the steps you followed with Netskope installed? Thx 
Prakash Rai 7Prakash Rai 7
@pradeep, Netskope is installed by my company's security team that was blocking sfdx to work properly now it has been resolved. Sorry I do not know the details on Netskope settings.