bitbucket-branch-source-plugin: Unable to scan team repositories from Bitbucket Cloud

Your checklist for this issue

  • Jenkins version

  • Plugin version :

  • Bitbucket cloud

  • Bitbucket server and version

Description

Jenkins ver. 2.164.2 Plugin 2.4.4 Bitbucket cloud

I’ve recently setup a new Jenkins instance hoping to get it working with Bitbucket, but I’ve noticed a strange issue. My steps:

  1. Create team with a few repos in BitBucket
  2. Get key/secret credentials from team (setup with return URL filled, all rights checked)
  3. Add key/secret credentials and select them in main configuration for the plugin. Other settings: cache enabled, manage hooks enabled
  4. Create Bitbucket team/project and fill the following settings: credentials the same as above, owner = team id from bitbucket.

On first scan, it’s reported as a success BUT I am getting this message:

Connecting to https://bitbucket.org using <key>/****** (<team id>) Could not resolve team details

Connecting is reported without error but scanned 0 repositories (out of 5)

However, using the same credentials to make a call to site/oauth2/access_token and get client_credentials, it works. Also, I can make a call to list repositories to https://api.bitbucket.org/2.0/repositories/<team id> using the token and it works (I can see the repos, etc).

If I setup a plain multibranch project selecting Bitbucket source with same credentials and using the same team name, I get an error saying that the team id wasn’t found.

I am also getting a strange error:

java.lang.NullPointerException: Descriptor list is null for context 'class org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject' in thread 'Handling GET /job/bb-test2/configure from 188.24.8.190 : qtp1535128843-9 AbstractFolder/configure.jelly FolderLibraries/DescriptorImpl/config.jelly LibraryConfiguration/config.jelly SCMRetriever/DescriptorImpl/config.jelly MultiSCM/DescriptorImpl/config.jelly' That seems related to required but deprecated plugin MultiSCM

Is there any advice you can give me? Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 9
  • Comments: 29 (8 by maintainers)

Most upvoted comments

Hi

I found this issue while googling “Error while loading repositories from cache” which was the error I was getting trying to setup the plugin. What I found out was that I needed to use my team workspace id, not the team name (my team name was on the form team-name, the id was teamname) so when I removed the dash in the owner field things started to work for me.

I’m not sure if this is related to this issue, but perhaps it can help others.

Btw. the help text for the owner field states:

Specify the name of the Bitbucket Team or Bitbucket User Account.

It could be a Bitbucket Project also, if using Bitbucket Server. In this case (Bitbucket Server):

  • Use the project key, not the project name.
  • If using a user account instead of a project, add a “~” character before the username, i.e. “~joe”.

Which could probably be clarified a bit, since it seems like a team name is not always accepted.

Best regards Jens