- Check if there are SSH keys created
ls -a -l ~/.ssh
- If there are no files or the folder doesn't exists, a SSH key should be created. If there's a key created, go to Step #4.
ssh-keygen -t rsa -b 4096 -C "{email}"
Hit enter to set all default values
- Set the SSH so that it can be used for any new SSH connection
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_rsa
- Add the SSH key to Git using the Web Application by adding a given title and pasting the contents of the key. To copy the key contents to the clipboard use the following command:
pbcopy < ~/.ssh/id_rsa.pub
- Finally, test the SSH connection
ssh -T git@github.com
- To add the SSH key to heroku use the following command:
heroku keys:add
- Log in to Heroku account
heroku login
- Create the application running the following command on the root folder:
heroku create {proyect-name}
- Push changes to heroku remote branch (created automatically in the previous step)
git push heroku master