SSH authenticatin issues deploying Rails app via capistrano
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:
I also set up a user named "nick" on my apache server and performed the following command:
scp ~/.ssh/idrsa.pub
That seemed to work. Am I missing something? Why is there no authentication? Here is my deploy.rb capistrano file.
defaultrunoptions[:pty] = true
set :repository, "
set :scm, "git"
set :user, "nick" # The server's user for deploys
set :scm_passphrase, # The deploy user's password
sshoptions[:forwardagent] = true
set :branch, "master"
set :deploy_to, "/var/apps/deploytest"
set :deployvia, :remotecache
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/irsprocessscripts
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{trysudo} touch #{File.join(currentpath,'tmp','restart.txt')}"
end
end
Kind regards,
Nick