Caused by: com.jcraft.jsch.JSchException: reject HostKey
Our server configurations were properly set in Jenkins' settings.xml, so we thought this would be an easy fix by just ssh-ing to that host which should register it into the hostnames. Not So FAST. We tried this as many different users including ROOT and jenkins. Ran the build again, same error. We tried a lot of things next, most of which I don't care to relive. Nothing worked. Here's what actually worked, on our Ubuntu environment (modify according to your own environment).
This will prompt you to accept the host authenticity, which of course you should accept.
I do not entirely understand why this actually prompts. Since this command shows up as a process running as Jenkins user, which I had already approved the host for. My suspicion is that maven actually runs that command as it's own user. However I don't really know how to verify that suspicion, and now that it works, it's time to move on.
No comments:
Post a Comment