Jenkins坚持使用SSH

时间:2019-02-13 09:52:48

标签: jenkins

我遇到了詹金斯问题,我正在尝试使用ssh在远程服务器上执行命令,我尝试了Freestyle Project和Pipeline SSH,并且两个版本都停留在“ [SSH] Executing ..”上。

图片:


SSH Stuck

Jenkins外部的SSH可以正常工作,因此不会出现网络或安全问题,并且凭据是正确的

管道:


def remote = [:]
    remote.name = 'Name'
    remote.host = 'Host'
    remote.user = 'User'
    remote.password = 'Password'
    remote.allowAnyHosts = true

node {
    stage('Remote SSH') {
        sshCommand remote: remote, command: pwd
        }
}

免费样式构建:


Free Style SSH

SSH站点成功配置:


Successful Connection

0 个答案:

没有答案