Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Integrating Jira Software(Server) with Bitbucket Cloud is not working as expected

Matis Aas
Contributor
October 25, 2022

Hello community!

I have integrated our Jira Software(server instance) with Bitbucket Cloud according to this article --> https://confluence.atlassian.com/adminjiraserver0815/linking-a-bitbucket-or-github-repository-with-jira-1167833041.html

Connection seems to work and I created a test account for myself in Bitbucket Cloud with test project and repository. Everything is set to private(workspace, project and repository) and I can see the private repository in Jira UI repo dropdown list, which is exactly how it should be according to the article mentioned above. However when I try to make the same integration with my colleague's account, it only shows the repository if it's made public. What might the problem be? According to the article, you should see all the repos(public & private) owned by the user you are authenticating as. Settings for those 2 accounts are exactly the same(workspace, project and repo are all private). When my colleague makes his repository public, it appears in Jira UI, but this is not an option and we definitely need to keep it private.


Best regards,
Matis

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2022

Hey @Matis Aas 

G'day.

This sounds like an OAuth permission issue since it can only see the repository when configured as public.

I suspect the OAuth permission is not configured to have access to viewing the private repository. Can you ensure the OAuth permission is configured according to the guide here.

Make sure it's configured under User avatar > Bitbucket settings

Cheers,
Syahrul

Matis Aas
Contributor
October 31, 2022

Hey Syahrul,

Thank you for your reply! Everything is configured according to the very same guide. It looks like a very weird anomaly... I'll let the user double-check just in case, but we even tried giving all the project/repo-related permissions and it still didn't change a thing. Recreated access tokens after changes etc, but no luck.

Matis

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 31, 2022

Hey @Matis Aas 

Interesting. Let me know how that goes.

On a side note, I wonder if you can ask the user to verify if the user trying to connect with a Personal Workspace or a Shared Workspace?

Per our KB, here are two types of Workspace in Bitbucket: Personal Workspace, created when a Bitbucket account is created, and a Team workspace the user manually creates.

So if the user is connecting to his Personal Workspace, then the user needs to generate the OAuth under his account. However, if the user connects to a Team workspace, the user needs to create an OAuth from the Team Workspace settings instead.

To generate an OAuth from Team Workspace, navigate to the top right corner, click the user Avatar > All Workspace, and locate the Workspace > Click manage. This will redirect the user to the Team Workspace settings and find Oauth consumers to generate the OAuth.

I hope this helps.

Cheers,
Syahrul

Matis Aas
Contributor
October 31, 2022

Hi @Syahrul

Can confirm that the permissions are correct. 
The user is connecting with a Personal Workspace, as did I, when I tried connecting. This is the weird thing about this, everything seems to be the same, but somehow accounts act different. We even tried creating new project/repo for the same users Workspace, but still no luck. Really running out of ideas.
I am not sure how much help this is, but the way we create OAuth token is a bit different than in that guide. We do it under Personal Workspace --> Apps and features --> OAuth consumers. Looks like the guide is a bit outdated(by the modification date of it), but is this way of creating OAuth token correct? 

Regards,
Matis

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 2022

Hey Matis,

Thanks for the update.

Yes, I verified that the link provided earlier is an outdated KB. I believe we have a newer updated KB on integration.

Linking Jira server to Bitbucket cloud account 

Also, the steps you took are correct; it's the updated way to get the OAuth key.

That said, can you review the latest KB and see if there are any missing steps, and can you let me know how you view the repository list? I am trying to reproduce it on my end.

Cheers,
Syahrul

Matis Aas
Contributor
November 2, 2022

Hey Syahrul,

Everything seems to be the same.
Exactly the same way it's described in the KB. I'll add an account under DVCS accounts in Jira by providing OAuth Key and OAuth Secret. When the integration is done, it syncs my repos from my Workspace and they'll appear in the dropdown. 
A picture to illustrate:
repos.JPG

Both are private repos.
Just a random thought, is there maybe some account limitation in Bitbucket Cloud? My account is completely fresh, only 1 project and 2 new repos, but the one we are trying to get to work is an older account connected with many projects/repos. Sorry if it's a dumb question, i'm not very familiar with Cloud environment as i haven't used it at all.


Regards,
Matis

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 2, 2022

Hey @Matis Aas 

Noted. I will need to investigate this further, so I have created a support ticket for you to continue.

You can view your ticket at our portal here

Cheers,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.15.0
TAGS
AUG Leaders

Atlassian Community Events