Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo: no tty present and no askpass program specified #157

Closed
sivagollapalli opened this issue Dec 4, 2013 · 1 comment
Closed

sudo: no tty present and no askpass program specified #157

sivagollapalli opened this issue Dec 4, 2013 · 1 comment

Comments

@sivagollapalli
Copy link

Initially my app rails stack is rails (3.2.11) and mina (0.2.1 0.2.1 6939c3e). Later I have update my stack to rails (3.2.14) and mina (0.3.0). After updating when I try to deploy it gives me "sudo: no tty present and no askpass program specified " error. My deploy task looks like

desc "Deploys the current version to the server."
task :deploy => :environment do
  deploy do
    # Put things that will set up an empty directory into a fully set-up
    # instance of your project.
    invoke :'git:clone'
    invoke :'deploy:link_shared_paths'
    invoke :'bundle:install'

    to:launch do
      queue "cd #{deploy_to}/current && RAILS_ENV=#{env} bundle exec rake state_json:state_json" if env == "staging"
      queue "cd #{deploy_to}/current && RAILS_ENV=#{env} bundle exec rake assets:precompile"
      queue "cd #{deploy_to}/current && touch tmp/restart.txt"
      queue "cd #{deploy_to}/current && echo 'Branch deployed in this release = #{branch}' > current_deployed_branch.txt" if env == "staging"
      queue "sudo monit restart sidekiq"
     end 
  end 
end

Could you help me where I went wrong?

@sivagollapalli
Copy link
Author

I have resolved this by adding user ALL=(ALL:ALL) ALL and %user ALL=(ALL) NOPASSWD: NOPASSWD: ALL on /etc/sudoers file where user would be your system login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant