SVN / Jenkins / MAVEN - 身份验证问题
我在使用 jekins 和 maven 进行 svn 身份验证时遇到一些问题。
以下是我的工作步骤:
- 我在一台新机器(linux Cent OS)上安装 Jenkins。
- 我向詹金斯声明了 2 份工作。
- 来自 svn url https://mydomain.com/myProject1/trunk 的第一份作业 checkout 应用程序,我配置凭据此 url 包含: user1/pwd1
- 来自 svn url 的第二个作业 checkout 应用程序 https://mydomain.com/myProject2/trunk,我为此网址配置凭据:user2/pwd2
此时没有问题,所有构建都正常。
现在,一位开发人员告诉我,当他想使用jenkin的菜单项:“执行Maven发布”时,他收到以下错误“/bin/sh:svn:找不到命令”。 我告诉我,jenkins 使用他自己的 svn 插件进行构建,但 Maven 会在机器上寻找真正的 svn 客户端安装。
- 所以我在这台机器上安装了一个svn客户端
现在我的问题是我不能同时使用snv用户user1和user2。 我有 SVNAuthenticationException。
当我使用 user1 手动检查 project1 时,项目 1 的所有构建都可以,但 poject2 的构建都是 KO。 反之亦然,我与用户 2 手动签出项目 2,这里项目 2 的构建没问题,而项目 1 的构建则 KO。
我认为当我进行手动结账时,凭证会保存在机器上的缓存中(svn 客户端),之后,jenkins 使用它们来构建所有项目。
你见过这个问题吗?你有解决办法吗?
任何帮助都是值得赞赏的。
提前致谢。
——
卢伊克
I have some problems on svn authentication with jekins and maven.
Here are the steps of my work :
- I install Jenkins on a new machine (linux Cent OS).
- I declare 2 jobs into jenkins.
- First job chechout application from svn url https://mydomain.com/myProject1/trunk, i configure credentials for this url with : user1/pwd1
- 2nd job chechout application from svn url https://mydomain.com/myProject2/trunk, i configure credentials for this url with : user2/pwd2
At this time no Problem, all builds are OK.
Now one developper tell me that when he want to use jenkin's menu entry : "Perform Maven Release", he's got the following error "/bin/sh: svn: command not found".
I tell me that jenkins for doing builds use his own svn plugin but maven look for a real svn client install on the machnine.
- So i install a svn client on this machine
Now my problem is that i can't use both snv users user1 and user2 at the same time.
I have SVNAuthenticationException.
When i do a manual chekout of project1 with user1, all my builds for project 1 are ok but builds for poject2 are KO.
And the inverse is right too, i do a manual checkout of project2 with user2, here builds for project2 are ok and builds for project1 are KO.
I think credentials are save or in a cache on the machine (svn client side) when i do the manual checkout and after that, jenkins use them to builds All the projects.
Have you ever see that problem ? have you a solution ?
Any help is appreciate.
Thanks by advance.
--
Loïc
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想你只是想禁用 svn 的客户端凭据缓存。例如,对所有命令使用“--no-auth-cache”开关。 (也可以通过更改 svn 配置来完成。)
不要忘记清除已经存在的缓存文件( ~/.subversion/auth 或 Windows...也许“Documents and Settings/%User%/Applications/Subversion/auth ”)。
另请参阅:
I think you just want to disable svn's caching of client credentials. E.g., use the "--no-auth-cache" switch on all of your commands. (Can also be done by changing svn config.)
Don't forget to clear the already-existing cache files ( ~/.subversion/auth or Windows... maybe "Documents and Settings/%User%/Applications/Subversion/auth").
See also: