请参考以下Jenkins流水线脚本:
sshagent(['sshuser']) {
sh "git clone ssh://git@git.local.com/test/test-commit.git"
}
我经常在Jenkins中看到以下日志:
Cloning into 'test-commit'...
Host key verification failed.
fatal: Could not read from remote repository.
我尝试了几种自动接受主机验证的方法,但都失败了,感到非常沮丧。