【问题标题】:Teamcity git push error - could not read username while using maven release performTeamcity git push 错误 - 使用 Maven 发布执行时无法读取用户名
【发布时间】:2018-10-29 10:15:06
【问题描述】:

我是 Teamcity 的新手,我已经为 teamcity (8.1.5) 上的一个 maven 项目配置了发布版本,并将 vcs 根设置为 GIT .

对于 VCS root,我已配置 git repo url 并在结帐期间使用密码身份验证。它成功签出 Git repo,但无法执行 mvn release:prepare 并抛出错误

The git-push command failed.
fatal: could not read Username for 'https://github.com': No such device or address

我知道这个错误意味着没有在 teamcity 上配置适当的凭据帮助程序,但为什么 teamcity 没有选择默认情况下在 auth 部分中配置的用户名/密码。

即使我尝试使用 mvn 参数传递凭据,并且 pom 具有以下 scm 设置

<scm>
    <connection>scm:git:https://github.com/abc/sp.git</connection>
    <developerConnection>scm:git:https://github.com/abc/sp.git</developerConnection>
    <url>scm:git:https://github.com/abc/sp.git</url> </scm>

我应该如何使它适用于 git push ?我在 TC 文档中找不到这个。

【问题讨论】:

    标签: git maven github teamcity teamcity-8.0


    【解决方案1】:

    除了上述所有设置外,我还必须更新我的 pom 以添加最新版本的 maven 发布插件,它工作正常

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>                
    </plugin>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-05-06
      • 2017-06-02
      • 1970-01-01
      • 2018-09-13
      • 2014-08-05
      • 2020-07-20
      • 2015-12-25
      相关资源
      最近更新 更多