Skip to content

Instantly share code, notes, and snippets.

@rdundon
Last active July 18, 2025 19:05
Show Gist options
  • Save rdundon/ce61bb82df985125a4ef4ec0e1f7e959 to your computer and use it in GitHub Desktop.
Save rdundon/ce61bb82df985125a4ef4ec0e1f7e959 to your computer and use it in GitHub Desktop.
How to Setup NPM to work with Zscaler on Mac
  1. Get the Zscaler Root CA. You likely need permission from your IT dept, or for them to provide it for you. You may also search for it in Keychain Access on Mac.

  2. Convert the .crt file to a .pem file per this SO answer:

    openssl x509 -in /Users/useraccount/ZscalerRootCA.cer -out /Users/useraccount/ZscalerRootCA.cer
  3. Edit (or create if nonexistent) ~/.npmrc file (official npmrc docs):

    cafile=/Users/useraccount/ZscalerRootCA.cer

    OR Edit (or create if nonexistent) ~/.zshrc or ~/.bashrc and set a value for NODE_EXTRA_CA_CERTS:

    NODE_EXTRA_CA_CERTS=/Users/useraccount/ZscalerRootCA.cer
    
  4. That's it!

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