# rpc 错误：代码 = 不可用，描述 = 连接错误：描述 = "传输：认证握手失败：x509：由未知机构签名的证书"

- **ID:** `go/grpc-tls-certificate-error`
- **领域:** go
- **类别:** auth_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

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

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.60.0 | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   Add the server's CA certificate to the client's trust pool using credentials.NewClientTLSFromFile.
   ```
2. **** (90% 成功率)
   ```
   Use the system root CA pool by ensuring the server uses a publicly trusted certificate.
   ```

## 无效尝试

- **** —  (90% 失败率)
- **** —  (80% 失败率)
