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

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.

1 Answer 1

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.