【问题标题】:How to configure TeamCity to clone from Gerrit?如何配置 TeamCity 以从 Gerrit 克隆?
【发布时间】:2018-10-24 23:52:44
【问题描述】:

我正在配置 TeamCity 与 Gerrit Code-Review 的集成。我建立了一个 TeamCity 项目并添加了一个 VCS Root。 TeamCity 用户连同其 SSH 密钥一起被添加到 Gerrit(这部分有效,使用 git clone ssh:// 从命令行克隆有效)。

在 VCS Root 配置中,我将 Fetch URL 设置为 ssh://teamcity@gerrit.local:29418/MyProject,但随后我测试了连接,但出现此错误:

Test connection failed in MyProject :: MyProject-gerrit.
Cannot find revision of the default branch 'refs/for/dev' of vcs root
"jetbrains.git" {instance id=28, parent internal id=-1,
parent id=dummy_jetbrains.git,
description: "ssh://teamcity@gerrit.local:29418/MyProject#refs/for/dev"}

TeamCity 尝试获取的 URL 确实是错误的,如果我尝试在 CLI 中使用 git 从中克隆,项目名称似乎是 MyProject%23refs/for/dev

配置 TeamCity 以使用 Gerrit 的存储库的正确方法是什么?

【问题讨论】:

  • 如何通知teamcity,投票机制?

标签: git teamcity gerrit


【解决方案1】:

我没有在 VCS 设置中设置任何默认分支,而是将 +:refs/changes/*+:refs/heads/* 设置为分支规范,从而解决了这个问题。

【讨论】:

    猜你喜欢
    • 2022-10-24
    • 2015-12-06
    • 2020-02-29
    • 1970-01-01
    • 2015-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多