如何在Hudson中通过shell输入subversion凭证?我尝试在HUDSON_HOME中生成文件hudson.scm.SubversionSCM.xml并重新加载配置,但没有应用更改。
发布于 2011-01-11 06:45:56
从shell输入凭据的最简单方法是使用"svn“可执行文件。Hudson可以识别它创建的~/.subversion/auth目录。
发布于 2014-03-22 00:07:14
在Windows下,全局证书存储在%APPDATA%\Subversion\auth下。下面的Groovy代码帮助生成这些凭据:
SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(url))
ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(SVNWCUtil.defaultConfigurationDirectory,"AD\user","password",true)
repository.setAuthenticationManager(authManager)
repository.getDir("", -1, null ,(Collection)null) // or some random SVN operation上面代码中使用的库(Gradle中的示例):
compile 'org.tmatesoft.svnkit:org.tmatesoft.svnkit:1.7.8'
compile 'net.java.dev.jna:jna:3.4.0' // so wincrypt is available确保您使用Hudson在Windows机器上运行的相同用户来运行代码。
发布于 2015-02-18 17:47:13
就从哈德逊河开始吧。安装所有必需的插件。点击链接,例如:-localhost:8080/hudson单击add job/Create job。在选择SVN将出现在那里的选项时,给出SVN位置。凭据链接显示在该链接上的there.Click之外。将打开一个表单,提供SVN所在位置的有效凭据。观察屏幕上的成功消息,然后返回到Create job,完成Job Create并构建任务。
https://stackoverflow.com/questions/4541060
复制相似问题