My usual way of fixing “known hosts” problems is to use the SSH feature on a (failing) build, do the SSH/Git operation on the console, and then grab the ~/.ssh/known_hosts
file generated. This file can then be committed to the repo and copied into place prior to executing the command that needs it.
If the ~/.ssh
folder does not exist, then just create it (both in SSH and also in the build process, prior to writing the known_hosts
file manually).