Bitbucket Cloud: Resource not found

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube-8.7 version)
  • what are you trying to achieve
    Adding Pull Request decoration to Bitbucket cloud
  • what have you tried so far to achieve this
    First, i have the bitbucket
    Setting up your OAuth consumer
    SonarQube uses a dedicated OAuth consumer to decorate pull requests. You need to create the OAuth consumer in your Bitbucket Cloud workspace settings and specify the following:

Name – the name of your OAuth consumer
Callback URL – Bitbucket Cloud requires this field, but it’s not used by SonarQube so you can use any URL.
This is a private consumer – Your OAuth consumer needs to be private. Make sure this check box is selected.
Permissions – Grant Read access for the Pull requests permission.

Setting your global ALM Integration settings
To set your global ALM Integration settings, navigate to Administration > ALM Integrations, select the Bitbucket tab, and select Bitbucket Cloud as the variant you want to configure. From here, specify the following settings:

Configuration Name (Enterprise and Data Center Edition only) – The name used to identify your GitHub configuration at the project level. Use something succinct and easily recognizable.
Workspace ID – The workspace ID is part of your bitbucket cloud URL https://bitbucket.org/{WORKSPACE-ID}/{repository-slug}
OAuth Key – Bitbucket automatically creates an OAuth key when you create your OAuth consumer. You can find it in your Bitbucket Cloud workspace settings under OAuth consumers.
OAuth Secret – Bitbucket automatically creates an OAuth secret when you create your OAuth consumer. You can find it in your Bitbucket Cloud workspace settings under OAuth consumers.
Once i fallowed above steps , i got below issue
image

Hi @swarup,

Thank you for sharing the details of the issue you are experiencing with us.

Looking at the error message the UI is showing you, there is a problem in the configuration parameters you are providing to SonarQube:

  • Make sure that the OAuth consumer in Bitbucket has permission to read pull requests
  • Make sure that the Workspace ID specified in SQ is the correct one.

In the SQ logs you should be able to find more details about which part of the configuration is wrong. Feel free to share them with us so that we can help you further.

Cheers!

i am having same issue. what should call back url be? i just did https : / / bitbucket . org / myworkspace
all permissions look correct

2024.08.28 22:01:37 INFO web[AZC4Sg3NeGIU7LmUAC/S][o.s.a.c.b.b.BitbucketCloudRestClient] Error returned by Bitbucket Cloud: 404 Resource not found
2024.08.28 22:04:08 INFO web[AZC4Sg3NeGIU7LmUAC/U][o.s.a.c.b.b.BitbucketCloudRestClient] Error returned by Bitbucket Cloud: 404 Resource not found

Hi,

Welcome to the community!

You’ve resurrected a thread that’s more than 3 years old. Per the FAQ, please don’t do that. Please create a new thread with all your details.

 
Ann

1 Like