【问题标题】:Create vcs root using Teamcity REST API使用 Teamcity REST API 创建 vcs root
【发布时间】:2014-06-23 20:54:46
【问题描述】:

我正在尝试使用 Teamcity REST API 创建 VCS 根。在REST Documentation 之后,我在XML 下面发布到http://TeamcityServer/httpAuth/app/rest/vcs-roots

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vcs-root name="TestVCS" vcsName="svn" modificationCheckInterval="5" href="/httpAuth/app/rest/vcs-roots/id:TestVCS">
    <project id="TestProject" name="&lt;Root project&gt;" href="/httpAuth/app/rest/projects/id:TestProject"/>
    <properties>
        <property name="externals-mode" value="externals-full"/>
        <property name="labelingMessage" value="Labeled automatically by TeamCity"/>
        <property name="labelingPatterns" value="trunk=&gt;tags"/>
        <property name="svn-config-directory" value="C:\Windows\system32\config\systemprofile\AppData\Roaming\Subversion"/>
        <property name="svn-use-default-config-directory" value="true"/>
        <property name="url" value="https://svn-uat.net/TestProject"/>
        <property name="user" value="testuser"/>
        <property name="password" value="testpwd"/>
        <property name="working-copy-format" value="1.6"/>
    </properties>
    <vcsRootInstances href="/httpAuth/app/rest/vcs-root-instances?locator=vcsRoot:(id:TestVCS)"/>
</vcs-root>

这将创建 VCS 根目录,但密码属性保持为空。我尝试使用 http://TeamcityServer/httpAuth/app/rest/vcs-roots/VCSId/properties/password 显式设置密码,但即使这样似乎也没有为 VCS root 设置密码。

【问题讨论】:

    标签: continuous-integration teamcity jetbrains-ide teamcity-8.0


    【解决方案1】:

    所以我在Jetbrains Developer Community 上找到了答案。这是因为出于安全原因,Teamcity 对 SVN 使用“secure:svn-password”,对 Perforce 使用“secure:passwd”而不是简单密码。所以我将我的 XML 更改为:

    <property name="secure:svn-password" value="testpwd"/>
    

    【讨论】:

      猜你喜欢
      • 2012-11-08
      • 1970-01-01
      • 2012-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-14
      相关资源
      最近更新 更多