Deployer: Error on deploy:release " stdin: is not a tty"

Created on 2 Sep 2015  Â·  10Comments  Â·  Source: deployphp/deployer

When I try to deploy in a vps with centos 6 runnig I get

 [RuntimeException]                                 
  stdin: is not a tty                                
  mkdir: cannot create directory `is': File exists   
  mkdir: cannot create directory `not': File exists  
  mkdir: cannot create directory `a': File exists    
  mkdir: cannot create directory `tty': File exists  
  bash: line 1: 20150902125342: command not found    

Most helpful comment

Ok, seems my cPanel-based server was causing these headaches because cPanel adds the mesg y command via /etc/bashrc

For future reference: add the code @amsolucionesweb suggested on top of your server's .bashrc file.

In my case, my file looks like this:

# /home/username/.bashrc

if [ $(expr index "$-" i) -eq 0 ]; then
    return
fi

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

All 10 comments

Please, show your deploy script and output of command with -vvv options.

This is de full log

user@user-dev:~/projects/usef/code$ dep deploy prod -vvv
➤ Executing task deploy:prepare
⤷ on [prod]
[[email protected]] Password:
Run: echo $0
> stdin: is not a tty
> bash
> 
Run: if [ ! -d /home/user5/public_html ]; then mkdir -p /home/user5/public_html; fi
> stdin: is not a tty
> 
Run: cd /home/user5/public_html && if [ ! -d releases ]; then mkdir releases; fi
> stdin: is not a tty
> 
Run: cd /home/user5/public_html && if [ ! -d shared ]; then mkdir shared; fi
> stdin: is not a tty
> 
⤶ done on [prod]
✔ Ok
➤ Executing task deploy:release
⤷ on [prod]
Run: mkdir /home/user5/public_html/releases/20150903162935
> stdin: is not a tty
> 
Run: cd /home/user5/public_html && if [ -h release ]; then rm release; fi
> stdin: is not a tty
> 
Run: ln -s /home/user5/public_html/releases/20150903162935 /home/user5/public_html/release
> stdin: is not a tty
> 
⤶ done on [prod]
✔ Ok
➤ Executing task deploy:update_code
⤷ on [prod]
Run: git version
> stdin: is not a tty
> git version 1.7.1
> 
Run: ls /home/user5/public_html/releases
> stdin: is not a tty
> 20150903162935
> 
Run: readlink /home/user5/public_html/release
> stdin: is not a tty
> /home/user5/public_html/releases/20150903162935
> 
Run: git clone  --depth 1 --recursive -q https://user:[email protected]/git/usef stdin: is not a tty/home/user5/public_html/releases/20150903162935 2>&1
[RuntimeException]   
  stdin: is not a tty 

Looks like bash does not available. Try manually run this command and check ssh user.

I'm resolving this setting this code in ~/.bashrc

if [ $(expr index "$-" i) -eq 0 ]; then
    return
fi

Thanks and sorry for the inconvenience

Ok

How can this be solved in another way? The setting in .bashrc as @amsolucionesweb mentioned doesn't work in my case...

Ok, seems my cPanel-based server was causing these headaches because cPanel adds the mesg y command via /etc/bashrc

For future reference: add the code @amsolucionesweb suggested on top of your server's .bashrc file.

In my case, my file looks like this:

# /home/username/.bashrc

if [ $(expr index "$-" i) -eq 0 ]; then
    return
fi

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

:+1: @Propaganistas

910

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ElForastero picture ElForastero  Â·  3Comments

ovaiskhan11 picture ovaiskhan11  Â·  4Comments

antonmedv picture antonmedv  Â·  5Comments

brunodevel picture brunodevel  Â·  3Comments

JonasDoebertin picture JonasDoebertin  Â·  4Comments