I have setup SSH keys using the pipelines config (use-ssh-keys-in-bitbucket-pipelines), and they work.
To test, in my bitbucket-pipelines.yaml I have the following:
- ssh deploy@dev.openrem.org date
Which results in the following output:
+ ssh deploy@dev.openrem.org date
Warning: Permanently added the RSA host key for IP address '139.162.218.154' to the list of known hosts.
Thu Jun 22 08:47:52 UTC 2017
However, when I use fabric, the key doesn't seem to be used and it tries to ask for a password instead:
fab deploy:host=deploy@dev.openrem.org<1s
+ fab deploy:host=deploy@dev.openrem.org
/usr/local/lib/python2.7/getpass.py:83: GetPassWarning: Can not control echo on the terminal.
passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
[deploy@dev.openrem.org] Executing task 'deploy'
[deploy@dev.openrem.org] run: mkdir -p /home/deploy/sites/dev.openrem.org/database
[deploy@dev.openrem.org] Login password for 'deploy': Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/fabric/main.py", line 757, in main
*args, **kwargs
...I have seen several questions on here that refer to getting fabric to work or similar, but all the solutions involve generating keys manually and setting environment variables (for example SSH-connection-failed-with-pipeline or How-do-I-set-up-ssh-public-key-authentication-so-that-I-can-use and from a blog building-testing-and-deploying-django-app-with-bitbucket-pipelines).
Is it possible to do this with the Bitbucket keys?