在TeamCity的无人值守运行时输入密码svn签的挑战 [英] svn checkout challenges for a password when running unattended in TeamCity

查看:186
本文介绍了在TeamCity的无人值守运行时输入密码svn签的挑战的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在配置 StatSVN 在TeamCity的运行过程和我跑进了一点一个问题,我需要的一些想法。首先,StatSVN需要反对的的工作目录的已经从SVN签出,就不能对应用程序,TeamCity的的出口的从SVN的副本运行。因此,它需要生成服务器上执行svn签。

I'm currently in the process of configuring StatSVN to run in TeamCity and am running into a bit of a problem I need some ideas on. Firstly, StatSVN needs to run against a working directory that has been checked out from SVN, it can't run against the copy of the app that TeamCity exports from SVN. As such, it needs to perform an svn checkout on the build server.

我所做的就是创建了运行由StatSVN创建报表所需的三个命令一个bat文件,其中第一个就是结帐:

What I've done is created a bat file which runs the three command required by StatSVN to create the report, the first of which is the checkout:

svn checkout [repository path]

现在,纠正我,如果我错了,但是这应该检出使用当前的身份。当然,它直接运行在命令行罚款。当它在TeamCity的运行,构建亚军被配置为拥有在SVN相同的权利,我的服务户头下运行。事实上,相同的服务帐户用于创建存储库和默认的目录结构,所以我毫不怀疑它的权利。

Now, correct me if I'm wrong, but this should checkout using the current identity. Certainly it runs fine directly from the command line. When it runs in TeamCity, the build runner is configured to run under a service accout which has identical rights to me in SVN. In fact the same service account is used to create repositories and default directory structures so I've no doubt it has the rights.

但是,每次构建运行时它挂起和停止后,这是显而易见的,为什么:

However, every time the build runs it hangs and after stopping it, it's obvious why:

[13:38:28]: C:\TeamCity\buildAgent\work\e8d4dc4070ecf602>svn checkout [repository path] 
[13:38:29]: Authentication realm: <[svn server]> Subversion Repositories
[13:38:38]: Password for '[service account]': 
[13:38:38]: Process exited with code 1

这似乎是挂并等待它显然不能得到运行期间无人看管的密码。有没有人对为什么发生这种情况的任何想法?

It appears to be hanging and waiting for a password which it obviously can't get whilst running unattended. Does anyone have any ideas on why this is happening?

更新:
通过StatSVN所需的下一个命令是一个SVN日志,它转储提交历史。即使你可以通过配置TeamCity的VCS结帐方式为自动的代理,因此导致在实际结账,而不是出口(这当然是preferable到手动命令),在SVN解决svn签的问题log命令仍presents同样的问题。

Update: The next command required by StatSVN is an "svn log" which dumps the commit history. Even if you can tackle the issue of svn checkout by configuring the TeamCity VCS checkout mode to "Automatically on agent" hence resulting in an actual checkout rather than an export (this is certainly preferable to a manual command), the "svn log" command still presents the same problem.

推荐答案

您至少可以要求输入通过停止

You can at least stop it from asking for input by using

svn checkout --non-interactive

这将是不能解决问题的,它不知道用户,但可能给你什么是错的更多信息

This will not solve the problem that it doesn't know the user, but might give you more information about what's wrong

这篇关于在TeamCity的无人值守运行时输入密码svn签的挑战的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆