-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
Jenkins 2.86
BitBucket Branch Source 2.2.4
Git Plugin 3.6.0
Git Client Plugin 2.5.0
(all plugins are latest as of 2017/10/23)
BitBucket 4.1 (not bitbucket.org)
Error:
Checking out git https://internal.hostname.com/scm/PROJECTNAME/testrepo.git into /var/lib/jenkins/jobs/test-bitbucket-multibranch-tabinf/branches/master/workspace@script to read Jenkinsfile > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://internal.hostname.com/scm/PROJECTNAME/testrepo.git # timeout=10 Fetching without tags Fetching upstream changes from https://internal.hostname.com/scm/PROJECTNAME/testrepo.git > git --version # timeout=10 using GIT_ASKPASS to set credentials (hidden) for (hidden) by password > git fetch --no-tags --progress https://internal.hostname.com/scm/PROJECTNAME/testrepo.git +refs/heads/master:refs/remotes/origin/master ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from https://internal.hostname.com/scm/PROJECTNAME/testrepo.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:817) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1084) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:120) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421) Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress https://internal.hostname.com/scm/PROJECTNAME/testrepo.git +refs/heads/master:refs/remotes/origin/master" returned status code 128: stdout: stderr: error: while accessing https://internal.hostname.com/scm/PROJECTNAME/testrepo.git/info/refs fatal: HTTP request failed at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1924) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1643) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:352) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:815) ... 8 more [Bitbucket] Notifying commit build result
Steps to reproduce:
- Create a Multibranch Pipeline job.
- Add Bitbucket branch source that uses a local Bitbucket 4.1
- Ensure there is a Jenkinsfile in the configured Bitbucket repository on at least one branch.
Note: same results when creating a Bitbucket Team/Project job instead of Multibranch Pipeline Job.
My Jenkinsfile: (although it is never checked out)
node('linux') {
deleteDir()
checkout scm
}
Expected Result:
- Branches are discovered
- Branches are built by checking out the source
Actual Result:
- Branches are discovered
- Checkouts fail.
Troubleshooting:
I performed the steps in the output of the failing job manually, and they work locally (but git prompts me for login rather than using GIT_ASKPASS as in Jenkins).