SSH authenticatin issues deploying Rails app via capistrano

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/idrsa.pub nick@notedup.com:~/.ssh/authorizedkeys

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, "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

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

1 Reply

Nevermind I figured it out. :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct