场景:在连接服务器时动态询问安装点详细信息,因此出现以下错误
脚本
node('agent') {
stage('Sync Repo') {
sshagent(['poc_ssh_key']) {
sh """
ssh -p XXX user@IP $mountpoint(Data003)
"""
}
}
错误
error:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This system has been onboarded to TPAM. Please use the TPAM interface link below to request privileged access to the server.
!! TPAM URL:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Please enter the root path variable [data001/data002/data003/data004/data005]
You entered:
经过大量研究,找到下面的解决方案,它正在按预期的方式工作。
node('agent'){
stage('Sync Repo'){sshagent(['poc_ssh_key']){sh“”“回声“ data003” | ssh -p 2022 user @ IP
“”“}}