如何正确配置Hudson(jenkins)持续集成系统的SVN?

发布于 2024-10-22 06:01:55 字数 2019 浏览 1 评论 0原文

我正在配置 jenkins 以在 MacOS 10.6.6 上构建我的 XCode 项目。为此,我安装了最新的 tomcat 容器和最新的 jenkins 作为 ROOT.war。除了添加 subversion 集成之外,一切正常:(。在 jenkins 中创建一个新项目后,我在“源代码管理”中选择了“subversion”,并以与我在命令行 subversion 工具中使用的方式相同的方式输入了我的存储库 URL:

https://svn.mydomain.local/main/project/trunk

不幸的是,它不起作用出现奇怪的错误“身份验证已取消”: 在此处输入图像描述

“详细信息”日志如下所示:

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)

最奇怪的事情:如果我单击“输入凭据”并且输入我的登录名和密码,Jenkins 报告“身份验证成功。信息现在存储在 Hudson 中。”但它仍然是红色的“无法访问”并且在构建时出现签出错误:(。

命令行 svn co 对于用户和 root 帐户都可以正常工作,并且缓存了所有凭据。也许任何在 macos 上拥有 hudson 的人有经验可以给点提示怎么办?

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:

https://svn.mydomain.local/main/project/trunk

Unfortunately, it is not working with a strange error "authentication cancelled":
enter image description here

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 :(.

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

神爱温柔 2024-10-29 06:01:55

只是为了检查基本设置,运行 tomcat/jenkins 的用户是否具有对 .hudson 目录及以下目录的写入权限,特别是对 hudson.scm.SubversionSCM.xml 的写入权限?

此外,其他人在 JAVA_ARGS 中设置 -Dsvnkit.http.methods=Basic,NTLM 成功。

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?

Additionally, someone else had success with setting -Dsvnkit.http.methods=Basic,NTLM in the JAVA_ARGS.

伤痕我心 2024-10-29 06:01:55

在Hudson配置中->管理插件 ->高级选项卡 ->确保您的 HTTP 代理配置设置正确。

In Hudson configuration -> Manage Plugins -> Advanced Tab -> Make sure your HTTP Proxy configurations are properly set.

烧了回忆取暖 2024-10-29 06:01:55

我们仅在一项作业上遇到相同的问题,但在配置作业时、当提交后脚本尝试触发构建时没有:

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
[...]

检查作业配置显示“包含区域”参数设置不正确:
trunk/src/dir

更正了此参数:
/trunk/src/dir

使詹金斯不再有问题

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

Corrected this params with :
/trunk/src/dir

makes jenkins no more having the issue

情痴 2024-10-29 06:01:55

我发现发布了一个博客 (blog.vinodsingh) 条目由面临非常相似问题的人提出。他只是删除了 .subversion 目录,问题就解决了。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文