Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pseudo-terminal will not be allocated because stdin is not a terminal. #1655

Closed
rootameen opened this issue Feb 2, 2016 · 7 comments
Closed

Comments

@rootameen
Copy link

Edit: updating comment/title because of new findings:

Hi guys.

I have a command that can only run through ssh -t from rundeck server to node. However, when adding it to a job either as a remote script or executing locally using ssh -t I get the error:

Pseudo-terminal will not be allocated because stdin is not a terminal.

when I add -t -t which should force it I get: tcgetattr: Invalid argument

How can I force jsch/rundeck to use ssh -t or just use the default ssh connection in the system?

@rootameen rootameen changed the title Long commands fail to run Pseudo-terminal will not be allocated because stdin is not a terminal. Feb 3, 2016
@scalp42
Copy link

scalp42 commented Feb 25, 2016

@rootameen try ssh -tt

@gschueler
Copy link
Member

the jsch plugin does not allocate a pseudo terminal, unless you are using the "sudo" authentication feature (so it can input a sudo password.)

You can either: try using the system ssh executable directly, by means of either a script plugin, or the "script-exec" node executor

@scalp42
Copy link

scalp42 commented Mar 1, 2016

@rootameen what @gschueler means is:

service.NodeExecutor.default.provider=script-exec
plugin.script-exec.default.command=/usr/bin/ssh -q -oSendEnv\=* -oStrictHostKeyChecking\=no -tt ${node.username}@${node.hostname} ${exec.command}

@gschueler
Copy link
Member

@scalp42 👍

@OrKoN
Copy link

OrKoN commented Jul 27, 2016

@scalp42 @gschueler how can I provide identity file to the command? it is defined in project.ssh-key-storage-path

@ahonor
Copy link
Contributor

ahonor commented Nov 17, 2017

The "Allocate Pty" project config setting should cause a TTY for all the connections.

@ahonor ahonor closed this as completed Nov 17, 2017
@abbos1117
Copy link

has any solution for gitlab-ci.yaml file that error ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants