Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Gemini CLI error

Gemini CLI: UNABLE_TO_GET_ISSUER_CERT_LOCALLY or unable to get local issuer...

Error message
UNABLE_TO_GET_ISSUER_CERT_LOCALLY or unable to get local issuer certificate

Status: WorkaroundLast verified 2 documented fixes1 source

What it means

Node.js could not verify the TLS certificate chain of Google's endpoints, so sign-in or API requests fail.

Causes

  • You may be on a corporate network with a firewall that intercepts and inspects SSL/TLS traffic, which often requires a custom root CA certificate to be trusted by Node.js (official troubleshooting guide).

How to fix it

  1. Fix 1.

    First set NODE_USE_SYSTEM_CA=1 so Node.js uses the operating system's native certificate store, where corporate certificates are typically already installed. Windows PowerShell: $env:NODE_USE_SYSTEM_CA=1

    Terminal
    export NODE_USE_SYSTEM_CA=1
  2. Fix 2.

    If that does not resolve it, set NODE_EXTRA_CA_CERTS to the absolute path of your corporate root CA certificate file. Windows PowerShell: $env:NODE_EXTRA_CA_CERTS="C:\path\to\your\corporate-ca.crt"

    Terminal
    export NODE_EXTRA_CA_CERTS=/path/to/your/corporate-ca.crt

More Gemini CLI errors

All 19 Gemini CLI errors

FAQ

What does "UNABLE_TO_GET_ISSUER_CERT_LOCALLY or unable to get local issuer..." mean in Gemini CLI?

Node.js could not verify the TLS certificate chain of Google's endpoints, so sign-in or API requests fail.

How do I fix "UNABLE_TO_GET_ISSUER_CERT_LOCALLY or unable to get local issuer..."?

There are 2 documented fixes. Start with the first: First set NODE_USE_SYSTEM_CA=1 so Node.js uses the operating system's native certificate store, where corporate certificates are typically already installed. Windows PowerShell: $env:NODE_USE_SYSTEM_CA=1

Is this Gemini CLI error fixed?

Status: Workaround. No release removes the cause. The documented fixes work around it.

Sources

Last verified against 1 source: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.