使用maven + gitflow发布

Leo*_*CBS 6 git ssh release maven git-flow

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

命令开始发布:

mvn jgitflow:release-start
Run Code Online (Sandbox Code Playgroud)

错误:

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)
Run Code Online (Sandbox Code Playgroud)

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

ps:我已经通过公钥/私钥克隆了我的存储库.

Leo*_*CBS 5

找到答案,在 Ubuntu 中禁用 ssh 检查

在您的 ~/.ssh/config 中(如果此文件不存在,只需创建它):

Host *
StrictHostKeyChecking no
Run Code Online (Sandbox Code Playgroud)

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