Dokku asks for password when trying to git push

I created a drop on the digital ocean with the image of ubuntu and doku. I completed this tutorial on deploying my application, I also made a configuration to add my ssh key to Dokka. Now when I try to "git push the [name] master", they ask me for the password "dokku @domain".

+8
digital-ocean dokku
source share
5 answers

I also had this problem because I work with several computers, so despite the fact that I downloaded both ssh public keys into the digital ocean before creating a drop, when I went in, I could do it on both machines, if I logged in as root,

however, when I first pressed the button

$ git remote add dokku dokku@my.server.url $ git push dokku 

as is happening in the digital oceanic manual i.

I found out that the user 'dokku' had only one of the keys loaded into his authorized key 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 it all and copied it.

I logged into my server as the root $ ssh root@my.server.url , then made my path to the dokku $ cd /home/dokku/.ssh/ user authorized keys folder

Then I discover that $ nano authorized_keys now in this file I already had one key, but you may not have one. In any case, I inserted my ssh key into this file and left the file.

From there, I was very good, if I clicked using the dokku user, it does not ask for a password, because it already recognizes my ssh key. By the way, there is a way to simplify all this, as two steps, but sometimes I like to do it a long way to make sure that the key really got into the file.

+5
source share

Try adding your local SSH key to the DigitalOcean control panel, then delete the old droplet and create a new one using this key. Now, when you open the drop IP address in the browser, you should see the Dokku setup page with your key, after finishing the git setup, click. Working.

+2
source share

Make sure you add the remote DigitalOcean Dokku to your local computer. If you try to add it to DO drops (yes, I made this stupid mistake), you will be asked to enter a password.

+2
source share

I had the same problem. I used this digital ocean tutorial

I am a Windows 8 user. I found that I had two errors:

  • So I used puTTy according to the tutorial to create my SSH public and private keys. Despite this, I found that my public key (id_rsa.pub) was incorrect when I opened Ruby on Rails with the command line. You can change it using git bash (allows Windows users to use the linux terminal) by editing the file through a text editor (I prefer to use vi ... commands here )

  • Following the SSH manual for Windows, it does not tell you to modify the sshd_config file (the link to this tutorial is here ), It is located in the section "Sixth access to keys only for keys". Once again, use gitbash to edit the sshd_config file using the text editor of your choice to make sure it has this configuration: PermitRootLogin without-password

This solved it for me. Hope this helps you guys.

0
source share

It happened to me. The reason was that my .ssh / id_rsa.pub key did not match the one I used when setting up Dokku.

I fixed this by creating a new key file on the Dokku server, inserting my own SSH key, and then running: 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 at the specified path.

0
source share

All Articles