Source: https://swgbar.com/en/guides/homebrew-docker-python-node-ca-trust-swg-macos/
Language: en

# Homebrew, Docker, Python & Node.js CA trust behind an SWG on Mac

Why Homebrew, Docker Desktop, Node.js, Python, git, and curl reject SWG-signed TLS certificates on macOS—and how to configure CA bundles vs. SWG bypass.

SWG bar · Updated November 18, 2026

On a corporate Mac behind HTTPS break-and-inspect, each developer runtime validates TLS certificates differently. While Safari and Chrome consult **macOS Keychain**, CLI tools and containers often use their own CA bundles—causing sudden build failures across package managers and SDKs.

## Why different Mac developer tools fail selectively

| Tool / Runtime | Default trust store on macOS | Common environment variable or setting |
| --- | --- | --- |
| **Node.js / npm / yarn / pnpm** | Compiled-in Mozilla CA bundle | `NODE_EXTRA_CA_CERTS=/path/to/corp-ca.pem` |
| **Python / pip / uv / requests** | `certifi` bundle or OpenSSL CA path | `SSL_CERT_FILE` / `REQUESTS_CA_BUNDLE` |
| **git** | OpenSSL or Secure Transport depending on build | `git config --global http.sslCAInfo /path/to/corp-ca.pem` |
| **curl / Homebrew (`brew`)** | macOS Secure Transport or OpenSSL CA bundle | `HOMEBREW_CURLRC` / `CURL_CA_BUNDLE` (check `curl --version`) |
| **Docker Desktop / Containers** | Linux VM & image `/etc/ssl/certs` (not macOS Keychain) | Add corporate CA to Docker VM / image trust store |

## 1\. Identify which registry or API hostname is intercepted

Before editing shell profiles or container builds, confirm which exact external hostnames are undergoing SSL inspection rather than failing due to DNS or firewall blocks:

```
swgbar domains list --status confirmed
swgbar probe registry.npmjs.org
swgbar probe pypi.org
swgbar probe ghcr.io
```

Note that package managers frequently redirect downloads across multiple hosts (for example `formulae.brew.sh` → `ghcr.io`, or `github.com` → `objects.githubusercontent.com`). See [Bypass SWG for multi-domain web apps, SSO, CDNs & APIs](<https://swgbar.com/en/guides/multi-domain-sso-api-cdn-swg-bypass/>).

## 2\. Decide between CA bundle configuration, TLS exception, or SWG bypass

*   **Append the enterprise root CA PEM**: When corporate policy requires all traffic to undergo SWG decryption, export the exact root CA identified in **SWG bar → Certificates** and configure `NODE_EXTRA_CA_CERTS`, `SSL_CERT_FILE`, `REQUESTS_CA_BUNDLE`, or `http.sslCAInfo` per your IT security guidance. Never disable TLS verification (`NODE_TLS_REJECT_UNAUTHORIZED=0` or `sslVerify=false`).
*   **Request an IT TLS inspection exception**: Recommended for shared registries, Docker base images, or tools with strict certificate pinning where maintaining custom CA bundles across CI and local machines is brittle.
*   **Use per-domain SWG bypass on authorized networks**: When you administer or are authorized to bypass specific hosts on your Mac, enable **Bypass SWG** in SWG bar (or `swgbar bypass enable <domain>`) and restart the CLI process.

## Compare workflows before changing system defaults

For step-by-step `CERTIFICATE_VERIFY_FAILED` remediation, read [Fix SWG TLS & SSL certificate errors in CLI and AI tools on a Mac](<https://swgbar.com/en/guides/swg-tls-certificate-errors-macos/>). To compare local routing rules with gateway policy exclusions, review [SWG bypass vs. TLS inspection exception](<https://swgbar.com/en/guides/swg-bypass-vs-tls-exception/>).

## Keep reading

*   [How to Bypass SWG on a Mac (One-Click Domain Bypass & CLI)](<https://swgbar.com/en/guides/how-to-bypass-swg/>)
*   [How to Bypass SSL Inspection on a Mac (Corporate SWG & Per-Domain Fix)](<https://swgbar.com/en/guides/bypass-ssl-inspection-mac/>)
*   [How to Bypass HTTPS & TLS Inspection on macOS (Break-and-Inspect Guide)](<https://swgbar.com/en/guides/bypass-https-tls-inspection-mac/>)
*   [How to Bypass Corporate Proxy & SWG SSL Inspection on a Mac](<https://swgbar.com/en/guides/bypass-corporate-proxy-ssl-inspection-mac/>)
*   [How to tell if your Mac is intercepted by an SWG (HTTPS & SSL inspection)](<https://swgbar.com/en/guides/detect-https-inspection/>)
*   [How to Check if Your Employer or Work Mac Is Intercepting HTTPS (SSL Inspection)](<https://swgbar.com/en/guides/check-if-work-mac-intercepting-https/>)
*   [SSL Inspection Checker for Mac: Menu Bar Tool to Detect HTTPS Interception](<https://swgbar.com/en/guides/ssl-inspection-checker-mac/>)
*   [Zscaler SSL Inspection on Mac: How to Check & Bypass per Domain](<https://swgbar.com/en/guides/zscaler-ssl-inspection-bypass-mac/>)
*   [Netskope SSL Inspection on Mac: Check Decryption & Bypass per Domain](<https://swgbar.com/en/guides/netskope-ssl-inspection-bypass-mac/>)
*   [Cloudflare WARP & Zero Trust TLS Inspection on Mac: Detect & Bypass](<https://swgbar.com/en/guides/cloudflare-warp-tls-inspection-mac/>)
*   [Confirmed vs. Suspected HTTPS inspection in SWG bar](<https://swgbar.com/en/guides/confirmed-vs-suspected-https-inspection/>)
*   [Inspect MITM root certificates & issuers in SWG bar](<https://swgbar.com/en/guides/inspect-mitm-root-certificates-macos/>)
*   [Enterprise SWG & MDM HTTPS inspection on a Mac](<https://swgbar.com/en/guides/enterprise-swg-https-inspection-macos/>)
*   [SWG bypass vs. TLS inspection exception (break and inspect)](<https://swgbar.com/en/guides/swg-bypass-vs-tls-exception/>)
*   [Bypass SWG for multi-domain web apps, SSO, CDNs & APIs on Mac](<https://swgbar.com/en/guides/multi-domain-sso-api-cdn-swg-bypass/>)
*   [Fix SWG bypass Recovering, Paused & connection errors on Mac](<https://swgbar.com/en/guides/troubleshoot-swg-bypass-recovering-paused-macos/>)
*   [macOS VPN virtual interfaces vs. SWG HTTPS inspection](<https://swgbar.com/en/guides/macos-vpn-virtual-interface-vs-swg-inspection/>)
*   [Why certificate-pinned apps & mTLS break under SWG inspection](<https://swgbar.com/en/guides/certificate-pinning-mtls-swg-inspection-macos/>)
*   [Fix SWG TLS & SSL certificate errors in CLI and AI tools on a Mac](<https://swgbar.com/en/guides/swg-tls-certificate-errors-macos/>)
*   [Fix Claude Code & Cursor 'unable to get local issuer certificate' on Mac (SWG & MCP)](<https://swgbar.com/en/guides/ai-coding-agents-claude-code-cursor-swg-macos/>)
*   [Verify TLS certificates with openssl & security verify-cert on Mac](<https://swgbar.com/en/guides/verify-tls-certificates-openssl-security-verify-cert-macos/>)
*   [SWG bar permissions, local privacy & TLS probe limits](<https://swgbar.com/en/guides/macos-network-extension-privacy-probe-limits/>)
*   [How SWG bar checks HTTPS inspection](<https://swgbar.com/en/how-it-works/>)
*   [Download & install SWG bar for Mac (macOS 14+)](<https://swgbar.com/en/install/>)
*   [Chrome Extension to Detect SSL & HTTPS Inspection (SWG Bar Companion)](<https://swgbar.com/en/chrome-extension/>)
*   [SWG bar CLI Guide](<https://swgbar.com/en/cli/>)
*   [SWG bar MCP Guide](<https://swgbar.com/en/mcp/>)
*   [SWG bar release information](<https://swgbar.com/en/releases/>)
*   [About SWG bar](<https://swgbar.com/en/about/>)
