After executing
cap deploy:setup
I get this error
failed: "sh -c 'sudo -p '\\''sudo password: '\\'' mkdir -p /u/apps/blog /u/apps/blog/releases /u/apps/blog/shared /u/apps/blog/shared/system /u/apps/blog/shared/log /u/apps/blog/shared/pids'" on foobar.com
Here is the content of my deploy.rb
require 'capistrano'
# Account Settings
set :user, "user"
set :password, "pass"
set :domain, "foobar.com"
set :mount_path, "/"
set :application, "blog"
set :repository, "/Users/me/Desktop/project"
set :local_repository, "/Users/me/Desktop/project"
set :scm, :git
set :deploy_via, :copy
role :app, 'foobar.com'
role :web, 'foobar.com'
What could be the problem ?
//EDIT
*** [err :: foobar.com] stdin: is not a tty
*** [err :: foobar.com] sudo:
*** [err :: foobar.com] can't mkdir /var/db/sudo: No such file or directory
*** [err :: foobar.com] sudo:
*** [err :: foobar.com] no tty present and no askpass program specified
failed: "sh -c 'sudo -p '\\''sudo password: '\\'' mkdir -p /u/apps/blog /u/apps/blog/releases /u/apps/blog/shared /u/apps/blog/shared/system /u/apps/blog/shared/log /u/apps/blog/shared/pids'" on foobar.com
Add this line to your deploy.rb
(for example after set :application, "blog"
)
default_run_options[:pty] = true
And now run:
cap -v deploy:setup
If you don't have sudo privileges add this line to deploy.rb
:
set :use_sudo, false
You must have permissions to create /u/apps/blog
directory or change deploy folder with:
set :deploy_to, "/home/user_name/apps/blog"
# Default value for :pty is false
set :pty, true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With