I have created a droplet on digital ocean with an image of ubuntu and dokku. I have followed this tutorial to deploy my app, I have also done the configuration to add my ssh key to dokku. Now when I try to "git push [name] master" I get asked for "dokku@domain" password.
-
Were you able to solve this? I'm stuck with the same issue. – Rickmasta May 19 '14 at 05:17
6 Answers
I had this problem too because I work from multiple machines so even though I uploaded both public ssh keys to digital ocean prior to creating the droplet when I went to sign in I could do so on both machines if I was logging in as the user 'root',
however when I went to push for the first time using
$ git remote add dokku dokku@my.server.url
$ git push dokku
like it does in the digital ocean guide i was following.
I found out that the user 'dokku' only had one of the keys loaded in its authorized keys file.
so here is what I did. In my terminal I used $ cat ~/.ssh/id_rsa.pub
which will display your public ssh key and I highlighted that whole thing and copied that.
I logged in to my server as the root $ ssh root@my.server.url
then made my way to the dokku users authorized keys folder $ cd /home/dokku/.ssh/
I then open that $ nano authorized_keys
now in this file I already had one key but you might not have any. In either case I pasted my ssh-key in this file and exited the file.
From there I was pretty much good now if I push using the dokku user it doesn't ask for a password because it already recognizes my ssh-key. By the way there is a way to simplify all this to like two steps but sometimes I like to go about it the long way just to make sure the key actually made it into the file.

- 896
- 9
- 21
Try adding your local SSH key in DigitalOcean control panel, then delete the old droplet and create a new one using this key. Now when you open droplet IP in the browser you should see Dokku Setup page with your key, after finishing setup git push should work.

- 1,274
- 2
- 15
- 32
Make sure that you add DigitalOcean Dokku remote on your LOCAL computer. If you will try to add it on DO droplet (yes, I made that stupid mistake) you will be asked for password.

- 457
- 5
- 9
This is the command for all steps described by @mkrinblk above:
$>
cat ~/.ssh/id_rsa.pub | ssh root@your.dokku.ip "sudo sshcommand acl-add dokku [description]"

- 1,019
- 4
- 16
- 31
I had the same problem. I used this digital ocean tutorial
I'm a windows 8 user. I found I had two error:
So I used puTTy as per the tutorial to generate my public and private SSH keys. Despite that, I found that my public key (id_rsa.pub) was wrong when I opened up Ruby on Rails with Command Prompt. You can change it by using git bash (allows windows users to use the linux terminal) editing the file via a text editor (I prefer to use vi ... commands are here)
Following the SSH tutorial for windows, it doesn't tell you to modify the sshd_config file (link to that tutorial here). It's at "Step Six—Lockdown Root SSH Access to Keys Only". Once again, use gitbash to edit the sshd_config file via the text editor of your choice to make sure it has this configuration:
PermitRootLogin without-password
That solved it for me. Hope it helps you guys.

- 386
- 5
- 6
This have happened to me. The cause was that my .ssh/id_rsa.pub key did not match the one I used when setting up Dokku.
The way I fixed this was to create a new key file in the Dokku server, paste inn my own SSH key, and then run: sudo dokku ssh-keys:add my_key_name /home/$USER/.ssh/my_key.pub
This will add your key to the Dokku authentication key file from the file in the given path.