Following the answer from HERE it is becoming a simple task.
- Generate SSH key by using the command:
ssh-keygen -t rsa -C “your_email@example.com” - Go to ~/.ssh
- If you don’t have a config file – create one with name config
- Add the following to the newly created config
Host heroku.work HostName heroku.com IdentityFile ~/.ssh/id_heroku_work_rsa IdentitiesOnly yes
id_heroku_work_rsa is the generated ssh key file using the command from as shown HERE:
Go to your project .git folder and find the config file there. Open it and change remote heroku to look like this:
[remote "heroku"] url = git@heroku.work:<you_app_git_path>.git