I am us开发者_JS百科ing Capistrano to deploy a ruby on rails project. I am attempting to login to remote server as user 'deploy' and deploy this application.
When I ssh into box as deploy and git clone the project it works
ssh deploy@remote_box
git clone git@github.com:lumdum/demo.git
However when I run using Capistrano it says that permission denied to account dorelal
. dorelal
is my account on GitHub. So I thought Capistrano is executing the task locally on my mac and not on my remote server which is on Redhat.
And that is true that Capistrano is running locally the command. when I execute
cap staging deploy -vvvv
this is the error message I am getting
executing locally: "git ls-remote git@github.com:lumdum/demo.git master
"
Notice it says 'executing locally'. Why is capistrano running it locally and not on my remote box.
here is my deploy.rb
set :stages, %w(staging)
require 'capistrano/ext/multistage'
set :repository, "git@github.com:lumdum/demo.git"
set :scm, :git
set :user, 'deploy'
set :use_sudo, false
set :keep_releases, 2
role :web, "serv1"
role :app, "serv1"
role :db, "db1", :primary => true
set :application, "demo_staging"
set :branch, "master"
set :deploy_via, :remote_cache
set :deploy_to, "/var/www/rails/demo"
set :scm_user, 'dorelal_lumdum'
set :user, 'deploy'
set :rails_env, "staging"
set :keep_releases, 1
Capistrano runs that locally to determine the HEAD on the repository, which is then used in the subsequent step to check-out (or, clone in Git terminology) the precise revision that was seen from your workstation.
I'll admit this is a little unexpected!
精彩评论