我试图设置构建命令,我得到了这些错误。我尝试过设置安全配置。
访问控制:
授权:基于矩阵。
用户组: joshis1 -选中所有.
在运行构建之后。我得到了以下错误。在构建脚本中,我只是试图复制一个文件。
FailedConsole输出
Started by user shreyas joshi
Building in workspace /var/lib/jenkins/workspace/Tungsten-Build
[Tungsten-Build] $ /bin/sh /tmp/hudson1841543545003586844.sh
November26
November26
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
Build step 'Execute shell' marked build as failure
Finished: FAILURE发布于 2013-11-26 13:28:28
我知道这个答案了。
visudo添加以下行:
<jenkins_user_id that u are using> ALL=(ALL) NOPASSWD: ALL注释这一行:
#Defaults requiretty发布于 2017-12-22 11:26:47
visudo解决方案可以工作,但不会注释掉。
Defaults requiretty您可以添加以下行:
Defaults:<jenkins user> !requiretty我应该加一句评论,但我的名声太低了.
发布于 2015-04-08 07:01:19
另一种方法是通过更改,在/etc/passwd中分配TTY。
myuser:x:498:499::/var/www/:/sbin/nologin至
myuser:x:498:499::/var/www/:/bin/bashhttps://stackoverflow.com/questions/20216900
复制相似问题