3

我正在尝试使用 Capistrano 部署更新,但出现以下错误。为什么这会失败?我之前已经部署到这个服务器。我已经包含了我的 deploy.rb 文件。

failed: "sh -c 'git clone -q --depth 1 git@github.com:username/sample_app.git /var/www    
/apps/sample_app/releases/20120518162414 && cd /var/www/apps/sample_app/releases/20120518162414 &&
git checkout -q -b deploy 1eac914d3b04039b8286416f51b4f223b626b267 && (echo 
1eac914d3b04039b8286416f51b4f223b626b267 > /var/www/apps/sample_app/releases/20120518162414   
/REVISION)'" on server.domain.com

部署.rb

# The name of your app
set :application, "sample_app"

# The directory on the EC2 node that will be deployed to
set :deploy_to, "/var/www/apps/#{application}"

set :keep_releases, 3

# deploy with git
set :scm, :git
set :repository,  "git@github.com:username/sample_app.git"
set :git_shallow_clone, 1
set :branch, "master"
set :use_sudo, true

set :user, "ubuntu"
ssh_options[:keys] = ["/ServerKeys/key.pem"]
ssh_options[:forward_agent] = true
default_run_options[:pty] = true

# The address of the remote host on EC2 (the Public DNS address)
set :location, "server.domain.com"

# setup some Capistrano roles
role :app, location
role :web, location
role :db,  location, :primary => true

after 'deploy:update_code', 'deploy:symlink_db'

namespace :deploy do

 desc "Restart Application"
 task :restart, :roles => :app do
 run "touch #{deploy_to}/#{shared_dir}/tmp/restart.txt"
 end

 desc "Symlinks the database.yml"
 task :symlink_db, :roles => :app do
 run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml"
 end

end
4

1 回答 1

1

问题是它拥有我的根 ubuntu 无权访问根文件

于 2012-05-18T23:00:18.970 回答