

Jenkins: the input device is not a TTY
source link: https://www.tuicool.com/articles/EbuaUnB
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

在使用jenkins执行docker容器内命令时,jenkins会提示
docker exec -it test_container bash build.sh the input device is not a TTY
在Stack Overflow上查找错误内容,解决方法如下:
去掉docker的-it或者把-it改成-i,即
docker exec -i test_container bash build.sh
这样就可以解决。
原因解析:
docker exec的参数t是指的Allocate a pseudo-TTY,jenkins在执行job时并不是在TTY终端中执行,所以-t的参数会报错。
PS:
pseudo-TTY:
在 Linux 中,TTY也许是跟终端有关系的最为混乱的术语。TTY是TeleTYpe的一个老缩写。Teletypes,或者teletypewriters,原来指的是 电传打字机 ,是通过串行线用打印机键盘通过阅读和发送信息的东西,和古老的 电报机 区别并不是很大。之后,当计算机只能以 批处理 方式运行时(当时穿孔卡片 阅读器 是唯一一种使程序载入运行的方式),电传打字机成为唯一能够被使用的“实时”输入/ 输出设备 。最终,电传打字机被键盘和显示器终端所取代,但在终端或TTY接插的地方,操作系统仍然需要一个程序来监视 串行端口 。一个getty“Get TTY”的处理过程是:一个程序监视物理的TTY/终端接口。对一个 虚拟网络 服务器( VNC )来说,一个伪装的TTY(Pseudo-TTY,即假冒的TTY,也叫做“PTY”)是等价的终端。当你运行一个 xterm ( 终端仿真 程序)或GNOME终端程序时,PTY对虚拟的用户或者如xterm一样的 伪终端 来说,就像是一个TTY在运行。“Pseudo”的意思是“duplicating in a fake way”(用伪造的方法复制),它相比“virtual”或“emulated”更能真实的说明问题。而在的计算中,它却处于被放弃的阶段。
tty也是一个Unix命令,用来给出当前终端设备的名称。
终端是一种字符型设备,它有多种类型,通常使用tty来简称各种类型的终端设备。
Recommend
-
21
[译] TTY 的前世今生(2008) Published at 2019-12-08 | Last Update 2019-12-08 本文翻译自 2008 年的一篇帖子 The TTY demysti...
-
24
I installed KISS Linux This new semester has been pretty easy on me, so far. I hardly every have any classes (again, so far), and I’ve a ton of free time on my hands. This calls for—yep—a distro hop! ...
-
4
Linux系统中UART驱动和TTY驱动两者有着紧密的关系,它们不像I2C和SPI驱动是单独一个模块,分析时应当将它们看成一个整体来分析。UART驱动部分依赖于硬件平台,而TTY驱动和具体的平台无关。本文的分析内容基于IMX6DL硬件平台和Kernel 3.0.35版本,...
-
8
Enabling serial tty login to a Raspberry Pi Depending on what Raspbian version you are running on your Pi, the approach for enabling a serial tty login via a VT terminal differs, but on current/recent versions you can enable...
-
11
谈到 Linux 和 UNIX 时,你一定听说过 “TTY” 这个术语,但是,这玩意是什么?来源:https://linux.cn/article-14093-1.html...
-
4
从UNIX到Linux,您一定听说过“TTY”这个词。作为桌面用户,你应该会用到它,并且你经常使用它。在教程中,让我提及让您熟悉Linux中的术语TTY所必需的一切。请注意,对此没有明确的答案,但它与过去输入/输出设备的交互方式有关。因此,您必须了解一些历史才能获...
-
7
安装 fbtermsudo apt install fbterm将用户添加到 video 组sudo gpasswd -a $USER video为 fbterm 分配 cap_sys_tty_config+ep 能力sudo setcap 'cap_sys_tty_config+ep'...
-
5
0x00 开篇 网上基于 websocket 打通 kubernetes pod 的实现非常多,但是受限于 webconsole 的不便利性,这边文章来分析下如何使用 SSH 方式打通 kubernetes 的登...
-
10
Linux tty Command Tutorial for Beginners (with Examples) In Linux, everything is a file. Even every hardware device connected to the system is represented as a special file. So it should come as no surprise that a terminal is a...
-
4
Kill user tty/pts sessions in Linux Commands w: show who is logged on and what they are doing who: show who is logged on tty: show current users pseudo terminal...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK