Preflight Checklist
What's Wrong?
This bug has been reported already in #10458
The issue still persists in the same way, since the issue was closed, I decided to create a duplicate.
When the NODE_EXTRA_CA_CERTS or SSL_CERT_FILE environment variables are set in ~./.claude/settings.json, they are not respected when requests are sent. Even though /status reports that additional CAs are set.
If they are set as environment variables (in any shell) before launching claude, they are respected.
What Should Happen?
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "<AUTH_TOKEN>",
"ANTHROPIC_BASE_URL": "<BASE_URL>",
"NODE_EXTRA_CA_CERTS": "<PATH_TO_CA>",
"SSL_CERT_FILE": "<PATH_TO_CA>"
}
}
With the following configuration claude should be able to send requests to the BASE_URL, instead I get Unable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates.
If NODE_EXTRA_CA_CERTS is set before launching in shell, it works.
Error Messages/Logs
Unable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates
Steps to Reproduce
- Use a
settings.json file with a ANTHROPIC_BASE_URL that has a self-signed certificate
- Set
NODE_EXTRA_CA_CERTS environment variable in settings.json to the correct certificate
- Requests will fail with
Unable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.29
Platform
Other
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
I reproduced this issue with on both Windows and macOS, with fish shell and powershell.
Preflight Checklist
What's Wrong?
This bug has been reported already in #10458
The issue still persists in the same way, since the issue was closed, I decided to create a duplicate.
When the
NODE_EXTRA_CA_CERTSorSSL_CERT_FILEenvironment variables are set in~./.claude/settings.json, they are not respected when requests are sent. Even though/statusreports that additional CAs are set.If they are set as environment variables (in any shell) before launching claude, they are respected.
What Should Happen?
With the following configuration claude should be able to send requests to the
BASE_URL, instead I getUnable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates.If
NODE_EXTRA_CA_CERTSis set before launching in shell, it works.Error Messages/Logs
Steps to Reproduce
settings.jsonfile with aANTHROPIC_BASE_URLthat has a self-signed certificateNODE_EXTRA_CA_CERTSenvironment variable insettings.jsonto the correct certificateUnable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificatesClaude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.29
Platform
Other
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
I reproduced this issue with on both Windows and macOS, with
fishshell andpowershell.