In order to deploy to my Dokku server hosted in Digital Ocean I have done the next:
1 . I have created a new SSH Key and I have added the public to my Digital Ocean
And the private to my CircleCi project
2 . I have added a call to a deploy.sh file at my circle.yml file
3 . I have added the follwing commands to my deploy.sh file
git remote add production email@example.com:daniboomerang
git push production master
4 . And at the end of my build I can see this
Warning: Permanently added ‘daniboomerang.com,22.214.171.124’ (ECDSA) to the list of known hosts.
5 . So I have build again and access through ssh to it
I wanted to check if my private key was added and if the public was the one I had in Digital Ocean.
And they were:
ubuntu@box196:~/daniboomerang$ cd ~/.ssh
authorized_keys build_key.rsa config id_circleci_github id_daniboomerang.com id_daniboomerang.com.pub id_heroku.com id_heroku.com.pub known_hosts
6 . I have checked my public key
ubuntu@box196:~/.ssh$ vi id_daniboomerang.com.pub
And it is the key I have on Digital Ocean.
And of course the private key is the one on CircleCi
Any idea about what am I missing?