I had a Ubuntu dev server that was put into production and the IP
address was changed from xxx.xxx.xxx.128 to xxx.xxx.xxx.195 It is
internal on our network.
I can push from my local Git to the Production server fine.
I've removed knowhost on my Ubuntu (~/.ssh) and Windows(C:\Documents
and Settings\joeuser\.ssh) boxes.

I've also generated new a key on the Ubuntu to no avail.

And before the IP address was changed the deploy work just fine.

deploy.rb file
------------------------------------------------------------------------------------------------------------
set :user, 'joeuser'
set :domain, '192.168.100.195'
set :application, "intranet"
set :rails_env, :production

set :repository, " #{user}@#{domain}:git/#{application}.git"
set :deploy_to, "/home/#{user}/#{application}"

set :scm_username, user
set :scm_password, proc{Capistrano::CLI.password_prompt('Git pass:' )}
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`,
`perforce`, `subversion` or `none`

role :web, domain                   # Your HTTP server, Apache/etc
role :app, domain                   # This may be the same as your
`Web` server
role :db,  domain, :primary => true # This is where Rails migrations
will run

set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
set :scm_verbose, true
set :use_sudo, false

# 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

after "deploy:update_code", :bundle_install
desc "install the necessary prerequisites"
task :bundle_install, :roles => :app do
  run "cd #{release_path} && bundle install"
end
------------------------------------------------------------------------------------------------------------


This is what I get when I run cap deploy
------------------------------------------------------------------------------------------------------------

C:\web\intranet>cap deploy
  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote  [email protected]:git/
intranet.git master"
[email protected]'s password:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.5.19/lib/capistrano/
recipes/deploy.rb:91: warning: failed to set environment variable.
Ruby 1.9.3 will raise SystemCallError in this case.
  * executing "if [ -d /home/joruser/intranet/shared/cached-copy ];
then cd /home/joruser/intranet/shared/cached-copy && git fetch  origin
&& git reset  --hard b5f90dc29146c5c79f1ad352162993d106fdc686 && git
clean  -d -x -f; else git clone   [email protected]:git/
intranet.git /home/joruser/intranet/shared/cached-copy && cd /home/
joruser/intranet/shared/cached-copy && git checkout  -b deploy
b5f90dc29146c5c79f1ad352162993d106fdc686; fi"
    servers: ["192.168.100.195"]
Password:
    [192.168.100.195] executing command
 ** [192.168.100.195 :: err] ssh: connect to host 192.168.100.128 port
22: No route to host
 ** [192.168.100.195 :: err] fatal: The remote end hung up
unexpectedly
    command finished
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/joruser/intranet/releases/20110418214000;
true"
    servers: ["192.168.100.195"]
    [192.168.100.195] executing command
    command finished
failed: "sh -c 'if [ -d /home/joruser/intranet/shared/cached-copy ];
then cd /home/joruser/intranet/shared/cached-copy && git fetch  origin
&& git reset  --hard b5f90dc29146c5c79f1ad352162993d106fdc686 && git
clean  -d -x -f; else git clone   [email protected]:git/
intranet.git /home/joruser/intranet/shared/cached-copy && cd /home/
joruser/intranet/shared/cached-copy && git checkout  -b deploy
b5f90dc29146c5c79f1ad352162993d106fdc686; fi'" on 192.168.100.195
------------------------------------------------------------------------------------------------------------




Any Ideas?

Thanks;
John

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to