[BUG] API Error: Unable to connect to API: Self-signed certificate detected.

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Jul 5, 2026 · closed Jul 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

<img width="778" height="105" alt="Image" src="https://github.com/user-attachments/assets/27e57778-0127-4c02-85c4-4f43652c17d8" />

API Error: Unable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates

It suddenly fails. Nothing changes in my system. Not under proxy, normal home internet.

What Should Happen?

Should work without error.

Error Messages/Logs

`API Error: Unable to connect to API: Self-signed certificate detected. Check your proxy or corporate SSL certificates`

Steps to Reproduce

Just sent hello prompt in Claude Code CLI.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code v2.1.201

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] · 3 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/24470
  2. https://github.com/anthropics/claude-code/issues/20194
  3. https://github.com/anthropics/claude-code/issues/71766

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

xuanswe · 3 months ago

Found issue:

  • Cloudflare DNS (1.1.1.3 / 1.0.0.3): Self-signed certificate detected
  • Google DNS (8.8.8.8 / 8.8.4.4): solve the error
github-actions[bot] · 1 month ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.