使用 maven + gitflow 发布

Release with maven + gitflow

我正在使用 Maven + gitflow 来生成我的应用程序的版本,但是当我尝试启动版本时我遇到了一个错误。

开始发布的命令:

mvn jgitflow:release-start

错误:

Caused by: org.eclipse.jgit.errors.UnsupportedCredentialItem:
ssh://git@127.0.0.1:10022: The authenticity of host '127.0.0.1' can't be established.
RSA key fingerprint is 7e:03:51:7b:55:a5:cd:de:4c:7a:0d:1b:43:75:08:68.
Are you sure you want to continue connecting?
      at  com.atlassian.maven.plugins.jgitflow.util.ConsoleCredentialsProvider.get(ConsoleCredentialsProvider.java:71)

如果我将 git url 更改为使用 HTTP 协议,则构建成功完成,错误仅出现在 ssh 协议中。

ps:我已经通过 public/private 密钥克隆了我的存储库。

找到答案,禁用 ssh 签入 Ubuntu

在你的~/.ssh/config(如果这个文件不存在,就创建它):

Host *
StrictHostKeyChecking no

这将为您连接的所有主机关闭它。如果您只希望它应用于某些主机,您可以将 * 替换为主机名模式。