bitbucket-branch-source-plugin icon indicating copy to clipboard operation
bitbucket-branch-source-plugin copied to clipboard

java.lang.IllegalStateException: Can't find clone link for protocol HTTP

Open cbolson1 opened this issue 1 year ago • 6 comments

Jenkins and plugins versions report

Environment
bitbucket branch source plugin version = 888.v8e6d479a_1730

What Operating System are you using (both controller, and any agents involved in the problem)?

Oracle Linux

Reproduction steps

  1. install plugin version 871.v28d74e8b_4226
  2. Configure plugin to use Personal Access Token to read list of projects in Bitbucket
  3. Configure plugin to use Access Key to read specific Bitbucket repository
  4. Configure the plugin to use "checkout over SSH"

Expected Results

Check out the code from the specified repo

Actual Results

Looking up Wainwright/sidecar for branches
Checking branch master from Wainwright/sidecar
      ‘jenkins/sidecar.groovy’ found
    Met criteria
ERROR: [Mon Jul 29 15:05:11 GMT 2024] Could not fetch branches from source 354743ac-03b3-4fe9-aeca-236e377ad636
[Mon Jul 29 15:05:11 GMT 2024] Finished branch indexing. Indexing took 4.5 sec
FATAL: Failed to recompute children of Sidecar
java.lang.IllegalStateException: Can't find clone link for protocol HTTP
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketGitSCMBuilder.lambda$getCloneLink$1(BitbucketGitSCMBuilder.java:313)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketGitSCMBuilder.getCloneLink(BitbucketGitSCMBuilder.java:313)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketGitSCMBuilder.withPrimaryRemote(BitbucketGitSCMBuilder.java:300)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketGitSCMBuilder.withBranchRemote(BitbucketGitSCMBuilder.java:293)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketGitSCMBuilder.withBitbucketRemote(BitbucketGitSCMBuilder.java:199)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketGitSCMBuilder.withCloneLinks(BitbucketGitSCMBuilder.java:130)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.build(BitbucketSCMSource.java:1034)
	at jenkins.scm.api.SCMSource.build(SCMSource.java:934)
	at jenkins.branch.MultiBranchProject.newBranch(MultiBranchProject.java:556)
	at jenkins.branch.MultiBranchProject$SCMHeadObserverImpl.observe(MultiBranchProject.java:2009)
	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:357)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveBranches(BitbucketSCMSource.java:793)
	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:633)
	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:372)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:282)
	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:654)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:269)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:167)
	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1057)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE

Anything else?

This appears to be directly related to #804 . However, I tried the latest plugin version (888.v8e6d479a_1730), and that still shows this problem. Therefore I'm tempted to believe that #804 is not solved.

Are you interested in contributing a fix?

No

cbolson1 avatar Jul 29 '24 18:07 cbolson1