mb cannot to connect to Metabase instances with certificates that are not trusted by Node.js by default.
The example below shows trying to connect to a local OrbStack container:
❯ mb auth login
│
◇ Profile name
│ default
│
◇ Metabase URL
│ https://metabase-62.metabase-compose.orb.local
│
◇ API key
│ •••••••••••••••••••
verification failed (/api/user/current): Could not reach Metabase: TLS error contacting metabase-62.metabase-compose.orb.local (SELF_SIGNED_CERT_IN_CHAIN) — the certificate could not be verified, or https:// was used against a plain-HTTP server. — credentials were not saved for profile "default"
As a workaround, run mb using NODE_USE_SYSTEM_CA=1:
❯ NODE_USE_SYSTEM_CA=1 mb auth login
│
◇ Profile name
│ default
│
◇ Metabase URL
│ https://metabase-62.metabase-compose.orb.local
│
◇ API key
│ •••••••••••••••••••
Logged in to https://metabase-62.metabase-compose.orb.local as Admin API Key (Admin). Saved to profile "default".
This can also happen in enterprise networks: https://nodejs.org/learn/http/enterprise-network-configuration
mbcannot to connect to Metabase instances with certificates that are not trusted by Node.js by default.The example below shows trying to connect to a local OrbStack container:
As a workaround, run
mbusingNODE_USE_SYSTEM_CA=1:This can also happen in enterprise networks: https://nodejs.org/learn/http/enterprise-network-configuration