go auth_error ai_generated true

rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: x509: certificate signed by unknown authority"

ID: go/grpc-tls-certificate-error

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2024-02-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
1.60.0 active — — —

Root Cause

The client cannot verify the server's TLS certificate because the CA is not trusted.

generic

中文

客户端无法验证服务器的 TLS 证书,因为 CA 不受信任。

Workarounds

  1. 95% success
    Add the server's CA certificate to the client's trust pool using credentials.NewClientTLSFromFile.
  2. 90% success
    Use the system root CA pool by ensuring the server uses a publicly trusted certificate.

Dead Ends

Common approaches that don't work:

  1. 90% fail

  2. 80% fail