# 错误：工作流在等待审批 60 分钟后超时。工作流已被取消。

- **ID:** `cicd/circleci-workflow-approval-timeout`
- **领域:** cicd
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 88%

## 根因

由于所需的审批者在默认的 60 分钟超时时间内未批准或拒绝作业，带有手动审批作业的 CircleCI 工作流超时。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| CircleCI CLI 0.1.3000 | active | — | — |
| CircleCI Server 4.0 | active | — | — |

## 解决方案

1. ```
   Use the CircleCI API to approve the job manually: `curl -X POST -H "Circle-Token: $CIRCLE_TOKEN" https://circleci.com/api/v2/workflow/{workflow_id}/approve/{approval_request_id}`. Find the approval_request_id from the workflow's jobs via the API.
   ```
2. ```
   Modify the workflow configuration to remove the approval job for non-production branches, or use a conditional approval: `when: << pipeline.parameters.deploy_to_prod >>` where the parameter defaults to false for development branches.
   ```

## 无效尝试

- **** — Project settings do not control approval timeout; the timeout is fixed per plan (60 minutes for free/paid) and cannot be changed via settings. (90% 失败率)
- **** — Re-running does not bypass the approval step; the same approval job will be triggered again, and the timeout will recur if no one approves. (85% 失败率)
