macos 如何为 hudson (jenkins) 持续集成系统正确配置 SVN?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5298152/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to correctly configure SVN for hudson (jenkins) continous integration system?
提问by grigoryvp
I'm configuring a jenkins to build my XCode project on MacOS 10.6.6. For this purpose i have installed latest tomcat container and latest jenkins as ROOT.war. All works fine except adding subversion integration :(. After creating a new project in jenkins i selected "subversion" in "Source Code Management" and entered my repository URL same way i use in command-line subversion tool:
我正在配置 jenkins 以在 MacOS 10.6.6 上构建我的 XCode 项目。为此,我安装了最新的 tomcat 容器和最新的 jenkins 作为 ROOT.war。除了添加 subversion 集成外,一切正常:(。在 jenkins 中创建一个新项目后,我在“源代码管理”中选择了“subversion”,并以我在命令行 subversion 工具中使用的相同方式输入了我的存储库 URL:
https://svn.mydomain.local/main/project/trunk
Unfortunately, it is not working with a strange error "authentication cancelled":
不幸的是,它不能处理一个奇怪的错误“身份验证已取消”:
The 'details' log looks like this:
“详细信息”日志如下所示:
Unable to access https://svn.mydomain.local/main/project/trunk : svn: authentication cancelled
org.tmatesoft.svn.core.SVNCancelException: svn: authentication cancelled
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:37)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:32)
at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getNextAuthentication(DefaultSVNAuthenticationManager.java:257)
at hudson.scm.FilterSVNAuthenticationManager.getNextAuthentication(FilterSVNAuthenticationManager.java:39)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:552)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:275)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:263)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1001)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.testConnection(DAVRepository.java:97)
at hudson.scm.SubversionSCM$DescriptorImpl.checkRepositoryPath(SubversionSCM.java:1842)
The most strange thing: if i click "enter credentials" and enter my login and password, Jenkins reports back "Authentication was successful. Information is stored in Hudson now." but it's still red "unable to access" and checkout error on build :(.
最奇怪的是:如果我单击“输入凭据”并输入我的登录名和密码,Jenkins 会报告“身份验证成功。信息现在存储在 Hudson 中。” 但它仍然是红色的“无法访问”和构建时的结帐错误:(。
Command-line svn co
works fine for both user and root accounts with all credentials cached. Maybe anyone who has a hudson on macos experience can drop a few hints what to do?
命令行svn co
适用于缓存了所有凭据的用户和 root 帐户。也许任何对 macos 有过 hudson 经验的人都可以给出一些提示该怎么做?
采纳答案by Jens Thee?
Just to check the basic setup, does the user running tomcat/jenkins have write access to the .hudson directory and below, specifically to hudson.scm.SubversionSCM.xml?
只是为了检查基本设置,运行 tomcat/jenkins 的用户是否对 .hudson 目录及以下目录具有写访问权限,特别是对 hudson.scm.SubversionSCM.xml?
Additionally, someone elsehad success with setting -Dsvnkit.http.methods=Basic,NTLM
in the JAVA_ARGS.
此外,其他人-Dsvnkit.http.methods=Basic,NTLM
在 JAVA_ARGS 中设置成功。
回答by Jegadeeshkumar
In Hudson configuration -> Manage Plugins -> Advanced Tab -> Make sure your HTTP Proxy configurations are properly set.
在 Hudson 配置 -> 管理插件 -> 高级选项卡 -> 确保您的 HTTP 代理配置正确设置。
回答by ??u??
We have the same issue on only one job, but not when configuring the job, when a post-commit script try to trigger a build :
我们只在一项作业上遇到了同样的问题,但在配置作业时没有,当提交后脚本尝试触发构建时:
27 oct. 2011 17:57:45 hudson.scm.SubversionRepositoryStatus doNotifyCommit
WARN: Failed to handle Subversion commit notification
org.tmatesoft.svn.core.SVNCancelException: svn: authentication cancelled
[...]
Inspecting the job configuration reveals that the "Included regions" parameters wasn't set correctly : trunk/src/dir
检查作业配置显示“包含的区域”参数设置不正确:trunk/src/dir
Corrected this params with : /trunk/src/dir
更正了这个参数:/trunk/src/dir
makes jenkins no more having the issue
让詹金斯不再有这个问题
回答by Jcs
I found a blog (blog.vinodsingh) entry posted by someone who faced a very similar issue. He just removed the .subversion
directory and it solved the problem.
我找到了一个博客 ( blog.vinodsingh) 条目,该条目是由面临非常相似问题的人发布的。他刚刚删除了.subversion
目录,它解决了问题。