-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 2.47
Bitbucket Branch Source Plugin 2.1.0
Bitbucket Server 4.8.5
Our Bitbucket Server located in subdirectory: https://company.com/bitbucket
Repositories available for cloning, e.g. via URLs ssh://git@company.com:7999/prj/repository.git and https://user@company.com/bitbucket/scm/prj/repository.git
Jenkins successfully adding Organization Folders and Multibranch Pipelines (in Organization Folder settings server URL added with subfolder), but cannot clone project repositories, because wrong repo URLs was generated:
> git fetch --tags --progress https://company.com/scm/prj/repository.git +refs/heads/master ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from https://company.com/scm/prj/repository.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:806) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:405) Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://company.com/scm/prj/repository.git +refs/heads/master" returned status code 128: stdout: stderr: fatal: repository 'https://company.com/scm/prj/repository.git/' not found at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1784) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1513) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:804) ... 8 more ERROR: null
Expected results: Jenkins should clone https://company.com/bitbucket/scm/prj/repository.git/ instead of https://company.com/scm/prj/repository.git/
P.S. Bitbucket Branch Source Plugin 1.9 works as expected.