SonarCloud unable to import new Bitbucket repository

Hello, I am unable to import any new repository from Bitbucket. Recently, we have migrate to another Workspace not sure whether this is the issue. But I have confirmed that it is linked to our organization Bitbucket account from the SonarCloud Organisation settings

Hey there.

What happens when you try? Do you get a specific error message?

Hi Colin,

I am unable to view any repositories for import. There is no error message

Is your organization bound to the right workspace? You can check this in your global Administratin > Organization Settings > Bind this organization to Bitbucket

Yes it is bound and when I click on the link it brings me to my Bitbucket workspace. In addition, we realized that we are unable to run Sonarcloud scanners from our Bitbucket pipelines. Error message as follows:

{“errors”:[{“msg”:“{"type": "error", "error": {"message": "You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated."}}”}]}

To update the above issue with more information it seems that SonarCloud CI pipeline scans that runs from an Pull Requests seems to face this error message. But when the CI pipeline scan was run from a feature branch itself it is working fine. The CI platform we are using is Bitbucket cloud. Thanks

It really sounds like something isn’t right in your binding. You have all the symptoms:

  • Unable to create new projects
  • (Specifically) PR analysis failing

Has something else changed in your environment recently? IP restrictions, or a change in your workspace name?