gpt4 book ai didi

jenkins-pipeline - sshpass : Failed to run command: No such file or directory

转载 作者:行者123 更新时间:2023-12-04 01:52:20 25 4
gpt4 key购买 nike

我正在尝试运行远程 sh来自 Jenkins将脚本更改为可执行文件,但出现以下错误:

[-manager_feature_kubernetes-YYLYXREUAV4NHLBACWJHV5YMQFOGHM4SS7G67ASIGYSZZGVS4VBQ] Running shell script
+ sshpass -p **** ssh'****@10.XX.XX.XXX chmod u + x /home/Script.sh '
sshpass: Failed to run command: No such file or directory

我的脚本的逻辑是:
sh "sshpass -p \" $ {passSSH} \ "ssh ${userSSH}@10.XX.XX.XXX \" chmod u + x /home/Script.sh \ ""

任何人都可以帮忙吗?

最佳答案

你有没有试过这个:

sshpass -p '$rootPassword' ssh -o 'StrictHostKeyChecking=no' $isRoot@$Host "chmod u+x /home/$USER/Script.sh"

关于jenkins-pipeline - sshpass : Failed to run command: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52425064/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com