I'm completely new to Capistrano and to Ruby, and I can't seem to get basic deployment set up. Every time I run cap deploy:check I get the following error:
servers: ["domain.com"] connection failed for: [email protected] (Net::SSH::HostKeyMismatch: fingerprint 0c:de:d4: 1b:e9:64:83:3a:8b:d7:c3:42:98:5b:5d:8c does not match for "[domain.com]:22,[62.39.11.2]:22" )
My deploy.db looks like this:
set :stages, %w(production staging) set :default_stage, "staging" require 'capistrano/ext/multistage' set :application, "captest" # TODO set :repository, "[email protected]:jy312/captest.git" # TODO set :scm, :git set :use_sudo, false ssh_options[:forward_agent] = true default_run_options[:pty] = true set :deploy_via, :remote_cache set :copy_exclude, [".git", ".DS_Store", ".gitignore", ".gitmodules"] set :git_enable_submodules, 1
I've tried adding my local computers public key (id_rsa.pub) to the list of known_hosts on my server with no luck.
Any suggestions would be greatly appreciated. Thanks a lot for the help.
The destination server's fingerprint is not matching what is in your local known_hosts
file. Remove the existing entry in your local known_hosts
file.
You can also try fixing the issue by directly SSH'ing to the server instead of going through ruby since it's an SSH issue.
or just rewrite it by (change USERNAME and IP of your server):
$ ssh-keygen -f "/home/USERNAME/.ssh/known_hosts" -R 178.X.X.X
then enter the server
$ ssh [email protected]
and answer yes
retry deploy
good luck ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With