I am trying to upload jar with Gradle
and used Gradle
SSH plugin: https://gradle-ssh-plugin.github.io/
Unfortunately, goal executed with error
* What went wrong:
Execution failed for task ':deploy'.
> reject HostKey: SERVERIPADDRESS
How to fix?
I found that there is similar error with Ant SSH task and it can be fixed with trust = true setting. Unfortunately, I can't find appropriate option here.
I.e. apparently, I need to configure SSH client so that it accept host's ID.
Try this:
ssh.settings {
knownHosts = allowAnyHosts
}
P.S: Sorry for editing mistakes, new to S.O.F.
Run: ssh-keyscan -t rsa server.com >> ~/.ssh/known_hosts
Explanation:
you have to add server SSH key info to your ~/.ssh/known_hosts
file.
To obtain ssh-info run command ssh-keyscan -t rsa server.com
and add its output to ~/.ssh/known_hosts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With