Please help me set up git to use ssh for my first deployment
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @corylahn,
After creating a Dokku One-Click Droplet, you need to visit the Droplet’s IP address in a browser to finish configuring Dokku. If you don’t, the Dokku instance will be vulnerable to anyone who finds the setup page and inserts their key.
When you visit the setup page, you’ll see three fields:
Since this topic is about the Public key, we’ll only be talking about that one but if anyone wants to learn more about dokku and the other configuration during setup they can do it here Dokku Quickstart
Now, onto the Public key! During the setup process, If you uploaded an SSH key to the Droplet when you created it, this field will be pre-populated with your public key. If not, add an SSH public key here.
Please note that you need to add your Public key file here! Usually, that’s the file id_rsa.pub.
Having said that if by any reason you can’ push to git afterwards and you want to change/add/remove an SSH key, there is a pretty easy way to do so from your Droplet.
SSH to your droplet
You have 3 commands which can help you manage your keys:
I’ll go over the 3 commands where I’ll just mention the list and remove command and give more information on the add command as this is what we are after now.
USAGE
You can use the ssh-keys:list command to show all configured SSH keys. Any key added via the dokku-installer will be associated with the admin key name.
As key names are unique, they can be used to remove a public SSH key.
An SSH Key can also be removed by fingerprint.
Both KEY_NAME and FINGERPRINT can be found using the dokku list command.
Now, onto what we are after! You can add your public key to Dokku with the ssh-keys:add command. The output will be the fingerprint of the SSH key.
KEY_NAME is the name you want to use to refer to this particular key. Including the word admin in the name will grant the user privileges to add additional keys remotely. Alternative way to add your SSH key and the one I use is running the below command on your local enviroment(laptop) the following command:
Regards, KFSys
nm, got it
When I try to put the ipv4 on a browser it redirects me to a ngix web without any options to do something. If I use the private ip on the browser, it doesnt work