0

我有一个以前在 Jenkins 主节点上运行良好的构建,我现在正试图在 Jenkins 从属节点上执行。

我正在使用 Jenkins Mercurial 插件并指向从机上的 TortoiseHg 安装目录。

我正在使用的 Mercurial 存储库由自签名证书(托管在 IIS 中)保护。

在本地机器上工作,我可以毫无问题地克隆存储库(这是让 TortoiseHg 保留用户密码所必需的)。

但是,当詹金斯执行构建时,我似乎遇到了问题。

下面列出了我得到的具体错误:

Building remotely on <slave> in workspace <workspace>
$ S:\Software\TortoiseHg/hg clone --rev default --noupdate https://<repository> <workspace_on_slave>
warning: <MercurialServerIP> certificate with fingerprint e3:5f:5e:ea:4f:da:ef:a4:0b:4a:bb:00:e8:31:59:de:ce:d0:28:94 not verified (check hostfingerprints or web.cacerts config setting)
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 2.1.2)
** Extensions loaded: mercurial_keyring
Traceback (most recent call last):
  File "hg", line 42, in <module>
  File "mercurial\dispatch.pyo", line 27, in run
  File "mercurial\dispatch.pyo", line 64, in dispatch
  File "mercurial\dispatch.pyo", line 87, in _runcatch
  File "mercurial\dispatch.pyo", line 685, in _dispatch
  File "mercurial\dispatch.pyo", line 467, in runcommand
  File "mercurial\dispatch.pyo", line 739, in _runcommand
  File "mercurial\dispatch.pyo", line 693, in checkargs
  File "mercurial\dispatch.pyo", line 682, in <lambda>
  File "mercurial\util.pyo", line 456, in check
  File "mercurial\commands.pyo", line 1157, in clone
  File "mercurial\hg.pyo", line 250, in clone
  File "mercurial\hg.pyo", line 93, in repository
  File "mercurial\httprepo.pyo", line 236, in instance
  File "mercurial\httprepo.pyo", line 57, in _fetchcaps
  File "mercurial\httprepo.pyo", line 169, in _call
  File "mercurial\httprepo.pyo", line 117, in _callstream
  File "urllib2.pyo", line 397, in open
  File "urllib2.pyo", line 510, in http_response
  File "urllib2.pyo", line 429, in error
  File "urllib2.pyo", line 369, in _call_chain
  File "urllib2.pyo", line 864, in http_error_401
  File "mercurial\url.pyo", line 429, in http_error_auth_reqed
  File "hgext\mercurial_keyring.pyo", line 332, in basic_http_error_auth_reqed
  File "urllib2.pyo", line 842, in http_error_auth_reqed
  File "urllib2.pyo", line 845, in retry_http_basic_auth
  File "hgext\mercurial_keyring.pyo", line 326, in find_user_password
  File "hgext\mercurial_keyring.pyo", line 177, in find_auth
  File "hgext\mercurial_keyring.pyo", line 60, in get_http_password
  File "keyring\core.pyo", line 37, in get_password
  File "keyring\backend.pyo", line 560, in get_password
  File "keyring\backend.pyo", line 573, in _get_password
pywintypes.error: (1312, 'CredRead', 'A specified logon session does not exist. It may     already have been terminated.')
ERROR: Failed to clone https://<repository>

任何人都可以就我可以做些什么来克服这个问题提供建议吗?

4

1 回答 1

0

非轮询解决方案:(如果您没有对存储库进行轮询以触发构建,则很有用)

解决这个问题的方法是在工作区位置(通常会结束)手动克隆从站上的存储库。

似乎一旦存储库在从站上可用,它就能够通过“指定的登录会话不存在”。它可能已经被终止了。错误。

轮询解决方案:(上面的解决方案似乎不适用于 Jenkins 轮询功能,所以我们只剩下下面的解决方案)。

请参阅如何将 Mercurial 的身份验证信息指定为 Jenkins 的一部分?(mercurial_keyring)

我能够弄清楚如何让服务器在我的设置中记住密码(并使用轮询)的唯一方法是在 \mercurial.ini 中手动指定它。

注意:您可能还需要从 mercurial.ini 中删除 mercurial_keyring 行。(这会禁用 Jenkins 服务器/从属服务器上的密钥环扩展,因为我们手动指定所有内容。)

于 2012-04-25T18:25:11.407 回答