【发布时间】:2021-07-14 13:39:46
【问题描述】:
我正在 Jenkins 上尝试以下操作:
steps {
script{
sshagent (credentials: ['creds']) {
sh '''
ssh -o StrictHostKeyChecking=no -tt jenkins@${IP} "
cd
"
'''
}
}
}
显然我只是想获取当前目录。作为输出,我得到:[2JConnection to IP closed
有人见过吗?
【问题讨论】:
-
没关系,问题是 -tt 选项,我放弃了它,它工作得很好。