Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capistrano deploy ** Host key verification failed

I've followed several suggestions from other sites but to no avail. When I try cap deploy:cold I consistently get "Host key verification failed."

I've tried everything. I've ssh'd from my computer to the remote, removed and readded both keys from known-hosts, cloned from github, set up my public key from both the server and local on github.

What am I missing here?


Capfile: https://gist.github.com/1308243


Errors: https://gist.github.com/1308255

like image 667
danhere Avatar asked Oct 22 '11 22:10

danhere


2 Answers

Add to your deploy.rb:

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

Or log in to the server(s) you are deploying to (as your deploy user) and run:

ssh [email protected]
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is **:**:**:.
Are you sure you want to continue connecting (yes/no)? yes

Most of the time I see this issue is when github.com in not in your ~/.ssh/known_hosts

like image 54
Rex Avatar answered Oct 25 '22 12:10

Rex


Instead of using a git ssh url which looks like this [email protected]:definelabs/urbanairship.git

use a read only url which looks like this git://github.com/definelabs/urbanairship.git

like image 21
Saurabh Wadhwa Avatar answered Oct 25 '22 14:10

Saurabh Wadhwa