Setting up your Heroku account

tutorial heroku backend ssh

When I first used Heroku, there is this command line interface that allows you to login and easily create apps and push updates onto the platform. However, I realized that this CLI is not really that easy to use at all. After working on it multiple times, it always gives me errors during the logins that I have to solve manually.

As such, I have decided to ditch the CLI totally and work with the SSH login manually. Seeing as to how long I have taken to figure everything, I have decided to make this tutorial for those that who are will be working with Heroku in one way or another.

Step 1: Generating the SSH public and private key Generate Key When asked to choose a location to save the file, enter ~/.ssh/heroku .

Step 2: Open up the SSH config file using VIM or any other editor Open File Open ~/.ssh/config in editor of choice

Step 3: Edit the config file Config file Enter the following text into the config file (In VIM, use :wq to save file)

Step 4: Open up your Heroku Account Setting Heroku Account Login to Heroku to edit the account settings, then scroll all the way down, until the SSH keys section

Step 5: Upload the public key SSH Public key Copy the content of ~/.ssh/heroku.pub, (rememeber to copy the .PUB file) Paste in Heroku And then just paste it in, add the key, and you are good to go.

Step 6: Celebrate Well, Heroku works like a Git repository. So the next time you want to push a project up, just use git push https://heroku.com/whatever/your/project/directory/is and git will use ssh to login to heroku, without you have to do a single thing.

Hopes this helps :)