Continuous integration 使用Teamcity REST API创建vcs根目录

Continuous integration 使用Teamcity REST API创建vcs根目录,continuous-integration,teamcity,jetbrains-ide,teamcity-8.0,Continuous Integration,Teamcity,Jetbrains Ide,Teamcity 8.0,我正在尝试使用Teamcity REST API创建VCS根目录。接下来,我将把下面的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/a

我正在尝试使用Teamcity REST API创建VCS根目录。接下来,我将把下面的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根目录的密码。

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

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