You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ADO YAML验证报错:未找到名为templates的仓库

问题原因

你注释掉了用于引用templates仓库的resources配置,但YAML中依然在stages部分使用了该仓库下的模板core/setVersion.yml@templates。Azure DevOps必须通过resources配置来定位跨仓库模板的来源,缺少这一配置时,系统无法找到名为templates的仓库,因此报错。

解决办法

根据实际需求选择以下一种方案:

  • 保留模板引用:取消resources区块的注释,确认name字段对应的项目和仓库名称准确无误:
    resources:
      repositories:
        - repository: templates
          type: git
          name: TemplateProject/TemplateRepo
    
  • 移除模板引用:如果不再需要该模板,直接删除YAML中的这一行:
    - template: core/setVersion.yml@templates
    

内容的提问来源于stack exchange,提问作者Stephen Wylie

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 22:50:20