Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have:

Computer A with id_rsa and

Computer B with different id_rsa and (it's not the same as that one from computer A) and id_rsa2

I created an account on heroku, with from machine A. Now I try to pull a project on machine B, so i tried to add from machine B. Unfortunately, some time ago I used it in another Heroku project (with another account) and I can't use it in this one. So I added, and it's valid. But heroku git:clone still tries to use id_rsa instead of id_rsa2. How can I force it?

share|improve this question

migrated from Mar 23 '13 at 19:22

This question came from our site for professional and enthusiast programmers.

the solution is to define local different domains locally in your machine, this is done by

adding the following to you ~/.ssh/config file

Host heroku.personal
  IdentityFile ~/.ssh/id_rsa
  IdentitiesOnly yes
  IdentityFile ~/.ssh/work_rsa
  IdentitiesOnly yes

now you can clone the project using git clone note that is used instead of

now we need to change .git/config in the project to cause any further git commands to use the new url

note that url in the file /path/to/your/app/.git/config is set to the url that you used in git clone command

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.