【发布时间】:2016-01-01 11:06:42
【问题描述】:
问题是当我将 monit 与 capistrano 一起使用时。我的错误是什么?
INFO [843c196b] Running /usr/bin/env sudo mv /tmp/monit.conf /etc/monit/conf.d/sidekiq_admin-api_production.conf as deployer@XXXXXXXXXX
DEBUG [843c196b] Command: ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.2.3 /usr/bin/env sudo mv /tmp/monit.conf /etc/monit/conf.d/sidekiq_admin-api_production.conf )
DEBUG [843c196b] sudo: no tty present and no askpass program specified
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deployer@XXXXXXXXXX: sudo exit status: 1
sudo stdout: Nothing written
sudo stderr: sudo: no tty present and no askpass program specified
我尝试了 ssh 密钥授权。
为我的用户更改文件夹的权限 (/tmp/monit.conf /etc/monit/conf.d/)
设置:pty,假
设置:use_sudo,假
sudo 文件
我的 sudo 文件是:
# User privilege specification
root ALL=(ALL:ALL) ALL
deployer ALL=(ALL) NOPASSWD:ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
【问题讨论】:
标签: ruby-on-rails-4 sidekiq capistrano3 monit sidekiq-monitor