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

调用Azure DevOps构建API遇仓库类型错误,该如何填写?

解决Azure DevOps构建API的“Repository type is missing/invalid”错误

调用该构建API触发构建时,必须通过repositoryType参数指定仓库类型,不同仓库对应的有效值如下:

  • Azure Repos Git:TfsGit
  • GitHub:GitHub
  • Bitbucket Cloud:BitbucketCloud
  • Subversion:Svn

以Azure Repos Git为例,修正后的请求URL示例:

"https://dev.azure.com/{organization}/{project}/_apis/build/builds?repositoryId=<repository-name>&branchName={branchName}&repositoryType=TfsGit&api-version=7.0"

额外提示:repositoryId优先使用仓库的GUID而非名称,名称可能存在重复或识别失败的问题,仓库GUID可在Azure DevOps仓库的设置页面中获取。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.23 20:21:58