Reputation: 2479
I am writing one capistrano script to deploy a PHP application here is my basic script
set :default_stage, "staging"
ssh_options[:forward_agent] = true
server "capistrano.myserver.com", :app, :web, :db, :primary => true
set :application, "PHP_App_capified"
set :scm, :git
set :repository, '.'
default_run_options[:pty] = true
set :user, 'capi5784'
set :deploy_to, "/home/user/public_html"
set :deploy_via, :copy
set :use_sudo, false
set :copy_exclude, [".git", ".DS_Store", ".gitignore", ".gitmodules", "Capfile", "config/deploy.rb"]
when I run the cap deploy I am getting the following error
failed: "sh -c 'cd /home/myserver/public_html/releases && tar xzf /tmp/20130808120301.tar.gz && rm /tmp/20130808120301.tar.gz'" on capistrano.myserver.com
Any suggestions what I am doing wrong ?
Upvotes: 1
Views: 245
Reputation: 29369
Two things:
Can you ssh into capistrano.myserver.com from your machine?
I think you need to enable use_sudo.
set :use_sudo, true
You would need sudo access to delete something from /tmp
Upvotes: 1