After adding public key to bitbucket
acct, ssh -T git@bitbucket.org
returns (in windows):
The authenticity of host 'bitbucket.org (131.103.20.167)' can't be established.
RSA key fingerprint is 65:8c:1b:f2:6f:91:6b:5c:3b:ec:4a:46:46:74:7z:40.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.org' (RSA) to the list of known hosts.
logged in as myusername.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
We verified that bitbucket.org
has been added to known_hosts
. The cap deploy
command returns:
Host key verification failed.
fatal: The remote end hung up unexpectedly
We added the following 2 lines to deploy.rb
file:
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
Now cap deploy
returns error:
Permission denied (publickey).
Keys are not passphrase protected. If the key is accepted by bitbucket
(ssh -T
returns right info), why we still have the error of Permission denied
.