>  Q&A  >  본문

nginx - capistrano 在部署项目时出现"sorry, you must have a tty to run sudo“怎么处理呢?

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_u1582phpcn_u15822734일 전878

모든 응답(1)나는 대답할 것이다

  • 某草草

    某草草2017-04-24 16:00:58

    vim /etc/sudoers

    • 비밀번호가 명확하게 표시되므로 "ssh 호스트 이름 sudo <cmd>"를 비활성화합니다.
    • 기본값 필수 #이 줄을 주석으로 처리

    또한 Capistrano에도 배포 비밀번호가 필요한 것으로 기억됩니다.
    set :password, "user1" #Password 배포 머신에 로그인하려면 배포가 없는 경우 비밀번호를 입력해야 합니다

    회신하다
    0
  • 취소회신하다