linux - Jenkins 构建错误

标签 linux jenkins

我正在尝试设置构建命令,但遇到了这些错误。 我试过设置安全配置。

访问控制:

  • Jenkins 自己的用户数据库。
  • 允许用户注册。

授权:基于矩阵。

用户组:joshis1 - 检查所有。

运行构建后。我收到以下错误。 在构建脚本中,我只是想复制一个文件。

失败的控制台输出

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

最佳答案

我得到了这个问题的答案。

visudo

添加以下行:

<jenkins_user_id that u are using> ALL=(ALL)       NOPASSWD: ALL

注释此行:

#Defaults    requiretty

关于linux - Jenkins 构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20216900/

相关文章:

linux - 在脚本中执行 ssh 命令

linux - 在 linux 机器上通过 jenkins 运行 selenium 脚本时,firefox 没有启动

jenkins - Ant在Docker容器中无法与Jenkins一起使用

linux - 如何从 Linux 上的文件中获取必填字段?

linux - 将通配符保存在 shell 脚本的变量中并在运行时评估/扩展它们

xml - 搜索一个字符串,但搜索该字符串之前和之后的另一组字符串

linux - 为什么 ejabberd 拒绝生成 token ?

Jenkins 管道 - try catch 特定阶段和后续条件步骤

maven - 我应该如何处理在 Cloudbees Jenkins 构建中下载 Maven 依赖项的问题?

msbuild - hudson : warning MSB3245: Could not locate the assembly “nunit.framework”