cicd
config_error
ai_generated
true
错误:未找到上下文 'deploy-aws'。请创建上下文或检查上下文名称。
Error: Context 'deploy-aws' not found. Please create the context or check the context name.
ID: cicd/circleci-missing-context
95%修复率
90%置信度
1证据数
2023-11-05首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| CircleCI CLI 0.1.28000+ | active | — | — | — |
| CircleCI Server 4.0+ | active | — | — | — |
| CircleCI SaaS | active | — | — | — |
根因分析
CircleCI 流水线引用了组织中不存在的上下文,原因可能是上下文被删除、名称拼写错误或用户缺少访问权限。
English
A CircleCI pipeline references a context that does not exist in the organization, either because it was deleted, the name is misspelled, or the user lacks permissions to access it.
官方文档
https://circleci.com/docs/contexts/解决方案
-
Create the missing context in the CircleCI web UI (Organization Settings > Contexts > Create Context) with the exact name 'deploy-aws', then restart the pipeline from the CircleCI dashboard.
-
Correct the context name in .circleci/config.yml by verifying the existing context list via CLI: `circleci context list --org-id <org-id>` and updating the `context` field in the job.
无效尝试
常见但无效的做法:
-
Renaming the context in the CircleCI web UI without updating the .circleci/config.yml file
60% 失败
The config file still references the old context name, causing the same error on the next pipeline run.
-
Creating a new context with the same name but in a different organization or team
80% 失败
Contexts are scoped to organizations; a context in a different org is not accessible to the pipeline.