Michael Sync
Michael Sync

Reputation: 5004

Capistrano + Git + DreamHost

I'm trying to deploy my rails application by using Passenger and Capistrano on Dreamhost. I'm using Git as a version control and we bought an account from GitHub.

I have installed all required gems, Passenger and Capistrano in my local machine and I have cloned the repository of my project from GitHub in my local machine as wel.

According to Dreamhost support, they have Passenger, Ruby, Rails and etc on their server as well.

I'm currently following this article http://github.com/guides/deploying-with-capistrano for my deployment.

The following is my deploy.rb.

default_run_options[:pty] = true
ssh_options[:forward_agent] = true

# be sure to change these
set :user, 'gituser'
set :domain, 'github.com'
set :application, 'MyProjectOnGit'
#[email protected]:MyProjectOnGit.git
# the rest should be good
set :repository,  "[email protected]:MyProjectOnGit.git"
set :deploy_to, "/ruby.michaelsync.net/"
set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
set :git_shallow_clone, 1
set :scm_verbose, true
set :use_sudo, false
set :git_enable_submodules, 1
server domain, :app, :web
role :db, domain, :primary => true

set :ssh_options, { :forward_agent => true }

namespace :deploy do
  task :restart do
    run "touch #{current_path}/tmp/restart.txt"
  end
end

When I run "cap deploy", I'm getting the error below.

[deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: github.com (Net::SSH::AuthenticationFailed: gituser) connection failed for: github.com (Net::SSH::AuthenticationFailed: gituser)

Thanks in advance..

Upvotes: 1

Views: 1129

Answers (3)

Michael Sync
Michael Sync

Reputation: 5004

i did to do sudo ln -s /opt/ruby/bin/packet_worker_runner /usr/bin/packet_worker_runner” and it solved the problem..

Thanks.

Upvotes: 0

stephenmurdoch
stephenmurdoch

Reputation: 34633

don't worry, you'll get it working in the end, I used to use the very same setup as yourself.... i.e. Dreamhost/Passenger/Capistrano/Git (and at one time, SVN) - it can be quite frustrating

Some things for you to do:

1) Read the following two articles by John Nunemaker @ railstips.com - I used to refer to them every single time I had to setup a server on Dreamhost (the second one is the most important but the first link gives you some tips that are well worth following)

1.1) http://railstips.org/blog/archives/2008/11/23/gitn-your-shared-host-on/ 1.2) http://railstips.org/blog/archives/2008/12/14/deploying-rails-on-dreamhost-with-passenger/

2) I think github is complaining about "gituser" - you do appear to set your username to "gituser" in your capfile - i would change that to your own name

3) you've got your domain down as github.com - again, this should be your own domain name and not github.... From what I recall..

4) start using heroku

good luck - hope this helps, let us know if it does or not....

cheers

Upvotes: 3

shingara
shingara

Reputation: 46914

You use your private url to clone your repository. Try with public clone URL

git://github.com/Myproject.git

Upvotes: 0

Related Questions