-
tty is enabled if run commands inside a docker container. If you need to run the script outside of container,
ssh -ttis the best approach I can think of. -
Got it. Thank you.
-
Previous Value Current Value true
false
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Issue Votes (0)
First time posting here, so I apologize if this is not the way to get this solved. I didn't know where else to get support for my issue.
We are currently running 11.6.5.
I'm in charge of configuring the CI for a project at work and an "Execute command" step is failing because there is no tty. The only reason I caught this was because a python script that is called utilizes the os.getlogin, which throws an error when used in a session without tty. I confirmed this by just running the tty command in the step and got "not a tty" as a result.
Agent is running as a system process on a remote user. RUN_AS_USER is set to a regular user with it's own home directory to store the workspace as well as other various files it needs for the build. It for the most part has no other issues other than it's not running the commands in a tty.
I have found a way around it for now, but I'm hoping there is a better solution. For now, I have the command executing the python script (as well as it's supporting commands) in a bash script and I setup up the user to be able to ssh -tt to itself via localhost and execute the script that way. The only thing I've found for OneDev relating to TTY is OD-364 but that doesn't seem to relate to my problem. I'll do my best to follow up with any requested information, but we do run our server on air gapped network, so any file sharing will not be possible.