Windows上的Jenkins slave中的Bitbucket的ssh密钥

时间:2017-12-06 10:51:31

标签: jenkins ssh bitbucket

我在Linux上有一个Jenkins大师,在Windows上有一个奴隶。主作业能够使用ssh克隆Git存储库,我们有配置。但这同样不适用于奴隶工作。它给出了以下错误:

stderr: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists."

我在从属节点中配置了Git工具位置。

2 个答案:

答案 0 :(得分:0)

问题在于从属节点配置。 其解释如下:

答案 1 :(得分:0)

我有同样的问题。唯一的区别是我的主人也是Windows。

当我尝试在Windows从属服务器上手动进行git clone时,它起作用了,但是当我尝试在Jenkins主服务器上触发构建时,发生了错误“ stderr:主机密钥验证失败”。

事实证明,我以“本地系统帐户”的身份启动了Jenkins代理Windows服务。将其更改为自己的域帐户后,它就可以使用。

所以请:

  1. 如果您手动在窗口从站上git clone您的远程仓库,请确保它可以正常工作。
  2. 检查您的Jenkins从站是否已作为Windows服务安装。
  3. 如果是,则将“登录”更改为用于步骤1的本地帐户,而不是默认的“本地系统帐户”。