I’m have a weird issue when using JGit in Jenkins (Added JGit as a tool, and removed normal git)
Everything is working fine, except I’m getting spammed by this message in the logs
Known hosts file /var/jenkins_home/.ssh/known_hosts contains invalid line xxxxxx
java.lang.IllegalArgumentException: Invalid hash pattern (insufficient data):
If I destroy the known_host file, it gets recreated automatically and the offending message is still present.
Any idea why Jenkins keeps adding entries seen as invalid from JGit’s point of view ?
I think it is because JGit does not support ED25519 private keys. Refer to JENKINS-73427 for more details. If you learn more about the issue, that is a great place to share what you learn.
The only current workaround is to use command line git.
Thanks, that’s exactly my issue.
That’s a shame because JGit was an elegant way of avoiding the deployment of git client.
That being said, when using the git client, I’m getting a new kind of error related (I think) to SELinux (Latest lts Jenkins running on Rocky9.5)