如何在 ssh 主机真实性问题上避免 Maven 构建停滞? [英] How to Avoid Maven builds stall on ssh host authenticity problem?

查看:13
本文介绍了如何在 ssh 主机真实性问题上避免 Maven 构建停滞?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

防止 ssh 主机真实性成为 maven 和 hudsno 构建问题的正确方法是什么?

What's the right way to keep ssh host authenticity from being a problem for maven and hudsno builds?

我让哈德森在虚拟机上构建我的 Maven 项目.当装有我的 VM 的 ESX 服务器被征税时,我的一些工作将陷入 ssh 主机真实性问题的循环中.主机位于已知的主机文件中,但在这段时间内,从属 VM 上的时钟与我的 Maven 存储库中的时钟相差很远.

I have hudson building my maven project on a VM. When the ESX server with my VMs on it is taxed some of my jobs will stall out stuck in a loop of ssh host authenticity problems. The hosts were in the known hosts file, but during these times the clocks on the slave VMs have drifted far from those of my maven repo.

[INFO] Retrieving previous build number from snapshots
The authenticity of host 'maven.mycorp.com' can't be established.
DSA key fingerprint is 6d:....83.
Are you sure you want to continue connecting? (yes/no): The authenticity 
of host 'maven.mycorp.com' can't be established.

除了禁用主机检查(CheckHostIP 否)之外,还有什么别的办法吗?

Is there something other than disabling host checking (CheckHostIP no)?

推荐答案

如果您只需要 Maven 或不使用 scpexe://,您也可以在 Maven 设置中执行此操作.

You can also do this in the Maven settings if you only want it for Maven, or you are not using scpexe://.

<server>
  <id>some-repo-id</id>
  <configuration>
    <knownHostsProvider implementation="org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider">
      <hostKeyChecking>no</hostKeyChecking>
    </knownHostsProvider>
  </configuration>
</server>

这篇关于如何在 ssh 主机真实性问题上避免 Maven 构建停滞?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆