Linking a Github repository to an existing account that already has a BitBucket link

I am trying to add a GitHub repository to my existing SonarCloud.io account. That account is linked to my current BitBucket repositories. However, I cannot seem to do that, I can only import BitBucket repositories.

I then tried to log in to SonarCloud.io with my GitHub account (same e-mail address as the BitBucket one), but then I get this message:

The email address <> is already associated to this user account:

It offers me to unlink the e-mail from the BitBucket account and create a new GitHub account for it. But that does not seem a wise thing to do, as I might lose access to my existing BitBucket SonarCloud.io projects.

Hello @BasRieter!

Welcome to the community forum!

You can have a look at the following thread that also talks about the subject:

In short you have to create two SonarCloud organizations, one for Github while connected with your Github account and one for Bitbucket while connected to your Bitbucket account.

And indeed when you switch to log in with an account or another you get a warning message that some feature will be disable, but you will always be able to switch between them an access both your organizations. You could also grant access to your Github or Bitbucket account to both of your SonarCloud organizations by adding them as members of your organizations.

I hope that helped.

Thanks for your answer. I already found that thread. And I understood that I had to log in with my Github account. But that one has the same e-mail adres as the Bitbucket one. So my main question is: what will happen to the BitBucket login? I don’t mind using seperate logins, but what I don’t want is to loose access to the BitBucket analysis.

You won’t loose access to your Bitbucket projects, you can switch back and forth between your Github and Bitbucket login’s as much as you want.

The only thing is that while you are logged in with your Github account on SonarCloud, if things happen in your Bitbucket organization:

  • You will no longer receive email notifications that your SonarCloud Bitbucket account is subscribed to
  • And issues won’t be automatically assigned to your SonarCloud Bitbucket account

But once you’ve setup your new Github organization on SonarCloud, you can easily invite your SonarCloud Bitbucket account as a member/owner of that new org, and use only your Bitbucket account on SonarCloud to access both of your organizations.

Great! That was what I was wondering. Thanks for the help!