问题描述
jenkins配置好项目后,使用Publish over SSH插件推送到服务器指定目录的时候报错。
Console Output报错信息:ERROR: Exception when publishing, exception message [Exec exit status not zero. Status
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.400 s
[INFO] Finished at: 2023-04-14T09:33:24Z
[INFO] ------------------------------------------------------------------------
SSH: Connecting from host [jenkins-6869f47d99-2fcgm]
SSH: Connecting with configuration [containerd master] ...
SSH: EXEC: completed after 201 ms
SSH: Disconnecting configuration [containerd master] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [127]]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
Finished: UNSTABLE
原因分析
[127]代表的意思是没有找到执行文件的目录,那么把执行文件配对了就能解决。
解决办法
我当前的Publish over SSH插件配置如下:
修改后的配置:文章来源:https://www.toymoban.com/news/detail-738531.html
重新build之后成功!文章来源地址https://www.toymoban.com/news/detail-738531.html
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 45.924 s [INFO] Finished at: 2023-04-14T09:47:04Z [INFO] ------------------------------------------------------------------------ SSH: Connecting from host [jenkins-6869f47d99-2fcgm] SSH: Connecting with configuration [containerd master] ... SSH: EXEC: completed after 54,291 ms SSH: Disconnecting configuration [containerd master] ... SSH: Transferred 1 file(s) Finished: SUCCESS
到了这里,关于Jenkins构建后通过SSH发包报错exception message [Exec exit status not zero. Status [127]]解决方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!