I upgraded to the latest git plugin (as part of upgrading all plugins), 3.6.2, and the multibranch pipeline builds all started to show no branches. I checked the index log and it seems that the index can no longer access the git repo:
Started
[Fri Oct 27 09:06:18 AEDT 2017] Starting branch indexing...
> git --version # timeout=10
> git ls-remote ssh:ERROR: [Fri Oct 27 09:06:19 AEDT 2017] Could not update folder level actions from source 0dd8c046-d274-4ca3-b085-b3634d8a1f41
hudson.plugins.git.GitException: Command "git ls-remote ssh: returned status code 128:
stdout:
stderr: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
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.launchCommandWithCredentials(CliGitAPIImpl.java:1561)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1552)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteReferences(CliGitAPIImpl.java:2729)
at jenkins.plugins.git.AbstractGitSCMSource.retrieveActions(AbstractGitSCMSource.java:824)
at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:591)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:978)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
[Fri Oct 27 09:06:19 AEDT 2017] Finished branch indexing. Indexing took 0.44 sec
If I downgrade to 3.6.0 the pipeline index scan can correctly scan the repo
[Fri Oct 27 09:20:05 AEDT 2017] Starting branch indexing...
> git rev-parse --is-inside-work-tree # timeout=10
Setting origin to ssh: > git config remote.origin.url ssh:Fetching origin...
Fetching upstream changes from origin
> git --version # timeout=10
using GIT_SSH to set credentials gitlab deploy key
> git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
using GIT_SSH to set credentials gitlab deploy key
> git ls-remote ssh: > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to ssh:...