Git_Bitbucket and Github with a same email address

53 views Asked by At

I have accounts on Butbucket and Github with same email address, but usernames are different. Should I generate the SSH keys or is there any easier guide to serve both plattform without problem?

I've tried this guide, but it didn't work for me. https://gist.github.com/rosswd/e1afd2b0b0d515517eac

1

There are 1 answers

2
VonC On

If you are using SSH URLs, as your guide suggests, the username does not matter.
(It would matter for HTTPS URLs).

What matters is:

That is how those respective remote Git repository hosting services (GitHub, Bitbucket Cloud) will know who you are.

That means you need to create two set of SSH keys:

ssh-keygen -t rsa -P "" 
ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa_bb

Don't forget to use the actual ~/.ssh/config Host entries for your SSH URLs:

git clone gh:meGH/MyGitHubRepository
git clone bb:meBB/MyBitbucketRepository