Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cbolson1 opened this issue Jul 29, 2024 · 5 comments
Open
Labels

Comments

@cbolson1
Copy link

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 cbolson1 added the bug label Jul 29, 2024
@rpaasche
Copy link

rpaasche commented Aug 5, 2024

Had the same issue, could be fixed by run "Scan Organization Folder" manualy. The most recent version 888.v8e6d479a_1730
is working just fine.

@cbolson1
Copy link
Author

cbolson1 commented Aug 5, 2024

I just have a single multibranch pipeline job setup; I don't have an organization folder configured here. Therefore, I don't think I can do what you are suggesting.

@cbolson1
Copy link
Author

cbolson1 commented Aug 5, 2024

One potentially important distinction here, I'm using the "checkout over SSH" feature in my job configuration.

@rpaasche
Copy link

rpaasche commented Aug 5, 2024

I just have a single multibranch pipeline job setup; I don't have an organization folder configured here. Therefore, I don't think I can do what you are suggesting.

In this case, it would be "Scan Multibranch Pipeline". Navigate to your job and it should be on the left side.

One potentially important distinction here, I'm using the "checkout over SSH" feature in my job configuration.

I do the same.

@cbolson1
Copy link
Author

cbolson1 commented Aug 5, 2024

Navigate to your job and it should be on the left side.

Yep. I did that. I still get the error message I posted in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants