task :test_without_sudo do run "whoami" end
task :test_with_sudo do run "sudo whoami" # I would generally recommend the following for sudo use: # sudo "whoami" # but you've got some complex commands that won't play nice with it endIf :test_without_sudo throws up a prompt, then you know it's unrelated to sudo is more likely connection-related. If :test_without_sudo doesn't prompt, but :test_with_sudo does, then you've not configured sudo correctly. If both execute without a prompt, but :umount_nfs_shares still does, then something else is wrong. :(
- Jamis On Apr 29, 2008, at 3:05 PM, Chuck wrote:
task :umount_nfs_shares do run "if [ `/sbin/ifconfig eth0 | grep inet | cut -d ' ' -f 12 | cut - d ':' -f 2` != #{internal_db} ]; then sudo umount `mount | grep blackbookmobile | grep us er | cut -d ' ' -f 3`; fi" run "if [ `/sbin/ifconfig eth0 | grep inet | cut -d ' ' -f 12 | cut - d ':' -f 2` != #{internal_db} ]; then sudo umount `mount | grep blackbookmobile | grep co ntact | cut -d ' ' -f 3`; fi" run "if [ `/sbin/ifconfig eth0 | grep inet | cut -d ' ' -f 12 | cut - d ':' -f 2` = #{internal_db} ]; then sudo chown -R sms:mongrel /public; fi" run "sudo chown -R user:group /var/www/blackbookmobile/" run "sudo chmod -R g+w /var/www/blackbookmobile/" end - Chuck On Apr 29, 2:56 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:Any chance you could share the definition of the "umount_nfs_shares" task? - Jamis On Apr 29, 2008, at 2:16 PM, Chuck wrote:Yes, but I've configured the group I'm a member of so that it doesn'trequire a password when I use sudo with a "NOPASSWD: ALL".On Apr 29, 8:57 am, Jamis Buck <[EMAIL PROTECTED]> wrote:Is anything trying to execute via sudo?- JamisOn Apr 29, 2008, at 8:37 AM, Chuck wrote:I was going to set up a cron job (under my own crontab, so it'd berunning as my user).Here's what I get when I attempt to deploy: (cap staging deploy)* executing `staging' triggering start callbacks for `deploy' * executing `multistage:ensure' triggering before callbacks for `deploy' * executing `umount_nfs_shares' * executing "umount command that's the first thing under umount_nfs_shares" servers: ["X.X.X.X", "X.X.X.X", "X.X.X.X"] Password:I didn't put a password on the SSH certificate, so I'm certain that's not it.Thanks, ChuckOn Apr 28, 4:37 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:How is your deployment script being run automatically? Is it beingrun as you, or a different user? When does it prompt for a password?(Might it be prompting for an SSH certificate passphrase, which isnot the same as the password?)- JamisOn Apr 28, 2008, at 3:55 PM, Chuck wrote:I'm trying to set up a deployment script that will run on a regular basis, but it continuously prompts me for a password.I set up a public/private key and can now log into the machines i'm deploying to from my deployment machine without a password, but cannot for the life of me figure out how to get capistrano to drop the password prompt.Any ideas/input?smime.p7s 3KDownloadsmime.p7s 3KDownloadsmime.p7s 3KDownload--~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
smime.p7s
Description: S/MIME cryptographic signature