To deploy docker container using ansible using CircleCI-2.0.
A private key has been created and added using the CircleCI-2.0 UI.
version: 2 jobs: build: docker: - image: ubuntu:xenial working_directory: ~/project
Running ansible results in:
Failed to connect to the host via ssh: Warning: Permanently added Permission denied (publickey,password)
The assumption was made that the keys would have been stored in ~/.ssh, but this seems to be empty.
Is your target host accepting this key (when tried manually)?
Yes. Log in using
ssh root@host -i key succeeds.
Are you using the same user in the container?
root user is used both manually as from the CircleCI-2.0.
In summary, the question is where does CircleCI-2.0 store the private keys that have been submitted using the UI? The
~/.ssh directory is empty.