Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
deploy option 'needs_tty' fails with "Pseudo-terminal will not be allocated because stdin is not a terminal." #2231
What I'm attempting to do is run su in a post-deploy. To do this, I know I need a tty which is achieved with -t. I found in the source of deploy that if I include needs_tty then a -t will be used on the ssh commands for deploy. However, when I do this, all the ssh commands output "Pseudo-terminal will not be allocated because stdin is not a terminal."
I believe this is because the deploy command is passed the config string by piping in the string, instead of passing it as an argument.
Operating System: OS X 10.11.5
Steps to reproduce
The pm2 log doesn't apply here, so this is from '/tmp/pm2-deploy.log'. From the logs, it looks like everything is operating correctly.
ssh -t email@example.com "cd /home/bob/source && git fetch --all"
Thanks for following up. I would expect that whatever I put in the string of a hook can be executed as if I put that same string in the shell. I haven't modified my deployment, but when I was writing it, I was able to do everything except what I mentioned in my original comment. I'm very glad you're adding more hooks, it was confusing what ran where before.
@vmarchaud I do see all the additional features, the limited number of hooks was a pain point in the current deployment tool. Personally, and on any project, if I'm using a tool (pm2) and that tool provides other related tools (pm2-deploy) I will almost always use that tool without looking for another (even if others have a million more features). I'm focussing on my project and trying out various deployment takes time away from that. Thank you for making a better tool though, not everyone works like I do.