Issue creating project using Bitbucket

Hello Team,

I’m using SonarQube 8.4 and trying to create project from Bitbucket.

The issue that I have is despite of having admin access it lists only first 8 projects whereas I have almost 50 projects and there is no icon indicating pages.

Hello @Ramya_Yarru,

I suspect it might be an issue with the permission of your token on the Bitbucket Server side. Did you read our documentation about the integration with Bitbucket Server?

It mentions that:

When creating your project, you’ll need to provide a personal access token from your user account with Read permissions for both projects and repositories.

Cheers

Hello Philippe,

I’m a bitbucket admin so I have access to all Projects and I have noticed that it displays around first 25 projects of Bitbucket.

To test if that was some other issue this is what I did, my project was around 50th project listed in Bitbucket since it was starting with “S” and projects get sorted based on ordering so it did not get displayed in sonarqube as it is currently displayed only first 25 projects of Bitbucket so I prefixed my project name with 01 so that it gets listed in first 25 projects of Bitbucket and now it is 14th project after renaming so it gets displayed in SonarQube because it is one of the first 25 projects in bitbucket.

To clarify, are you talking about BitBucket Server Projects, or git repositories?

They are Bitbucket server Projects.

@Ramya_Yarru Correct me if I’m wrong, but you should be able to search for the repository you’d like to import with the search feature. Isn’t it working properly?

No, the search functionality works only for the listed projects (i.e first 25 projects of Bitbucket listed in SonarQube). If I try to search for a repository which doesnt belong to the projects that Sonarqube displays, it says “No repositories match your filter.”

Hi, can you find your repository if you query this endpoint directly in your browser, once authenticated?

https://your-bitbucket-instance.com/rest/api/1.0/repos?projectname=&name=XXXXX

with XXX as exactly what you enter in the SonarQube search filter.

Yes, I can find it.

Gotcha, I reproduced this locally. Thanks a lot for your answer. Ticket is here

Thank you @pierreguillot. Any ETA on this?

@Ramya_Yarru No ETA on this. I’d suggest that you watch the Jira ticket so that you get informed of any changes.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.