nginx - capistrano 在部署项目时出现"sorry, you must have a tty to run sudo“怎么处理呢?
phpcn_u1582
phpcn_u1582 2017-04-24 15:58:58
0
1
830

capistrano 部属一项目,当执行到”sudo xx/xx/xx/nginx -s reload“ 时出现”sorry, you must have a tty to run sudo“这个问题说明什么呢?
ps:
操作系统是centos 5 我也在网上找到一些方法,例如:
http://blog.csdn.net/chinalinuxzend/a...
http://www-01.ibm.com/support/docview...
也照做了。但是没有起作用,反而在部属的时候要我输入:Password: 。有类似的情况吗?

phpcn_u1582
phpcn_u1582

reply all (1)
某草草

vim /etc/sudoers

  • Disable "ssh hostname sudo ", because it will show the password in clear.
  • Defaults requiretty #Comment out this line

In addition, I remember that your capistrano also requires a deployment password.
set :password, "user1" #Password to log in to the deployment machine. If there is no deployment, you need to enter the password

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!