We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

riclf • 7 years ago

In the user.name in the config file, I thought it was your real name "Bob Doe" versus an actual Username like "bdole". Am I wrong? Is this name important to be as you have specified it? Thx.

mzprx • 6 years ago

The configuration in file config works. Thank you.

Cesar Mosta • 6 years ago

Awesome! This worked for me, I spent around of 3 hours troubleshooting an error regarding offering wrong ssh key, but this post helped me to fix it.

Thanks!

Josep Lladonosa • 7 years ago

Thank you very much. Just to point that, when the repo is already cloned and belongs to an organisation (or another user), remote url would be:

git remote set-url origin git@github.com-user1:organisation/projectname.git

Jeremy Greer • 7 years ago

Wow, basically just copied your article...
https://blog.developer.atla...

Jamie W • 7 years ago

Thanks! This let me use multiple deploy keys on one machine. It solved the "Error: Key already in use" problem where GitHub does not let you duplicate deploy keys for different repositories.

Stefan Taubert • 8 years ago

Very helpfull, thanks !

Nathan Quarles • 8 years ago

Thanks!

Nate Lubeck • 9 years ago

This is brilliant! Appreciate the effort.

Muhammad Mohsin • 9 years ago

How I can add remote for specific SSH profile?
git remote add origin git@bitbucket.org:userofrepo/reponame.git reponame_githubusername
What I am doing wrong? I am unable to add origin this way to map it to right SSH profile

Muhammad Mohsin • 9 years ago

Basically I am having this error when I try to use git remote update, it asks me for right passphrase but here is error:

Fetching heroku
Fetching origin
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin

Nate Lubeck • 9 years ago

so what you want to do is: git@bitbucket.org-userName for your remote url and then in your `.git/config` file you would do: `Host bitbucket.org-userName
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_rsa`

tigonash • 10 years ago

Thank you! It really stopped me from add/delete ssh key at least thrice a day.

Rafael Nonato • 10 years ago

Thanks!

Jessica Mauerhan • 10 years ago

This also works if you have one account but use different ssh keys associated with different email addresses for different purposes. Thanks so much for this, it really helped me.

Tom Atkins • 10 years ago

Glad you found it useful :-)

Tony Garland • 11 years ago

Thanks for this -- it really helped me with GitHub. Most of the other tips I've read about trying to use multiple keys at GitHub (with different identities) were pretty awkward or involved some customization of git (via scripts).