2

I have a problem with capistrano and sudo prompt password. When I run cap deploy it asks me for sudo password but I type it and hit enter but it seems that it is still waiting for more input. How can I tell that I'm finished typing?

2 Answers 2

4

Deployment process asks password not from you, but from executing process at your remote server so you can't access remote prompt. I have this problem once. Some solutions:

  • (Bad). Use sudo_password in your deploy.rb
  • (Good). Setup right and permissions to not to use sudo access at all.

Second advice much better :)

3
  • Additionally you can look at this solution: stackoverflow.com/a/6057262/323249 Commented Oct 29, 2012 at 13:14
  • so there is no way to pass password to this prompt? it would be very strang since this is recommended capistrano way? Commented Oct 29, 2012 at 13:29
  • If you deployment user is not root - then there's really not a way to do so. Use root as deployment user (if it's possible) or setup permissions for your current deployment user. Commented Oct 29, 2012 at 13:32
2

Did you try this in deploy.rb?

default_run_options[:pty] = true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.