40

有没有办法设置 Jenkins 在执行 SVN 提交时将使用的凭据?我找不到这样做的方法。

如果我在我的机器上运行 Jenkins 服务器,它安装了 SVN 客户端并且我的凭据被缓存,它似乎工作正常,但如果我尝试在另一台机器上运行 Jenkins 服务器,则会出现错误。
ERROR: Failed to tag org.tmatesoft.svn.core.SVNCancelException: svn: No credential to try. Authentication failed

4

4 回答 4

46

如果您进入 Jenkins 要求存储库的作业配置窗口;如果您在放入 repo 后等待一秒钟,它会尝试连接,如果它无法连接,它会在存储库位置下用红色文本提示您[如下所示];单击提供的链接,您可以提供密钥以及您希望进行身份验证的任何其他方式。如果成功,它将尝试连接,您的构建应该可以正常连接。 在此处输入图像描述

如果您无法获得红色提示,则为另一台机器设置身份验证的 url 将通过 jenkins 在此处。

于 2011-04-05T19:47:22.963 回答
18

If it still doesn't work there is a way for you to manually enter your credentials.

Next to the Repository URL text box click the question mark. In that box will be the following text: "click this link and specify different credential". Click on that link to open the Subversion Authentication page. On that page enter the root of the repository URL, enter the login and password to use and click OK.

于 2012-06-11T21:35:03.537 回答
2

我们使用svn+ssh我们的身份验证机制,在我们的例子中,您必须确保您的从属设备具有不需要手动输入密码的 ssh 访问权限(即用于ssh-keygen生成密钥)。

如果您可以简单地通过 ssh 进入服务器ssh username@server,那么 Jenkins 执行提交应该不会有问题。

于 2011-03-29T00:22:08.390 回答
0

您可以在 Jenkins 服务器命令行(在主服务器或从服务器上)执行结帐操作,然后输入用户并通过那里,永久接受 SSL 证书,然后您的作业配置中不需要 SVN 命令的凭据。

于 2016-10-19T08:37:08.063 回答