当使用“sudo su”时,jenkins在ssh上执行shell

问题描述 投票:0回答:1

Exec commandexecute shell over ssh,我只把命令sudo su放在那里。

但是当我构建项目时,它总是停在命令sudo su直到超时。

The image show what I get in console output.

jenkins ssh
1个回答
1
投票

欢迎来到StackOverflow。

sudo

sudo用于自定义安装,系统文件修改等

Interactive shells (human in front of monitor)

当您执行sudo之前的某个命令时,此shell将询问您某个特权用户的密码。此ask事件等待用户响应:

enter image description here

Background executions

某些进程,crons,脚本或jenkins等应用程序需要执行sudo命令。但在此模式下,无法输入密码。这是你超时的原因

Solutions

© www.soinside.com 2019 - 2024. All rights reserved.