I am trying to deploy a rails app to my linode. I have set everything up following Ryan Bates' instructions at:
https://github.com/ryanb/railscasts/wiki/Server-Setup
I keep running into the following SSH authentication error when I run deploy:update from local:
Enter passphrase for /Users/iNick/.ssh/id_rsa:
[notedup.com] executing command
** [notedup.com :: out] Permission denied (publickey).
** [notedup.com :: out] fatal: The remote end hung up unexpectedly
command finished
*** [deploy:update_code] rolling back
I have added a public SSH key to github as per:
http://help.github.com/mac-key-setup/.
I also set up a user named "nick" on my apache server and performed the following command:
scp ~/.ssh/id_rsa.pub
nick@notedup.com:~/.ssh/authorized_keys
That seemed to work. Am I missing something? Why is there no authentication? Here is my deploy.rb capistrano file.
default_run_options[:pty] = true
set :repository, "git@github.com:jinx2/deploytest.git"
set :scm, "git"
set :user, "nick" # The server's user for deploys
set :scm_passphrase, ****** # The deploy user's password
ssh_options[:forward_agent] = true
set :branch, "master"
set :deploy_to, "/var/apps/deploytest"
set :deploy_via, :remote_cache
set :application, "notedup.com"
role :app, application
role :web, application
role :db, application, :primary => true
# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these
http://github.com/rails/irs_process_scripts
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
Kind regards,
Nick