Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47629

Branch Indexing of username/password protected repository fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • git-plugin
    • git-plugin: 3.6.2
      Jenkins: 2.86
      Windows Server 2012 R2

      The branch indexing using the git-client does not work anymore, in case the indexed repository is password protected and requires GIT_ASKPASS to be set.

      The error was introduced in the git-client 3.6.1 and my best guess is that it is related to PR#544.

       At version 3.6.0 the branch indexing looks like this:

      Starting branch indexing...
       > git.exe rev-parse --is-inside-work-tree # timeout=10
      Setting origin to https://****.git
       > git.exe config remote.origin.url https://****.git # timeout=10
      Fetching origin...
      Fetching upstream changes from origin
       > git.exe --version # timeout=10
      using GIT_ASKPASS to set credentials ****
       > git.exe fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
      using GIT_ASKPASS to set credentials ****
       > git.exe ls-remote --symref https://****.git # timeout=10
       > git.exe rev-parse --is-inside-work-tree # timeout=10
      Setting origin to https://****.git
       > git.exe config remote.origin.url https://****.git # timeout=10
      Fetching & pruning origin...
      Fetching upstream changes from origin
       > git.exe --version # timeout=10
      using GIT_ASKPASS to set credentials ****
       > git.exe fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune
      Listing remote references...
       > git.exe config --get remote.origin.url # timeout=10
      using GIT_ASKPASS to set credentials ****
       > git.exe ls-remote -h https://****.git # timeout=10
      Checking branches...
      

      In Version 3.6.2 this happens:

      Starting branch indexing...
       > git.exe --version # timeout=10
       > git.exe ls-remote --symref https://****.git # timeout=10
      ERROR: [Mi Okt 25 14:48:06 MESZ 2017] Could not update folder level actions from source 1670125f-05be-412b-9264-27212be64b57
      hudson.plugins.git.GitException: Command "git.exe ls-remote --symref https://****.git" returned status code 128:
      stdout: 
      stderr: fatal: Authentication failed for 'https://****.git/'
      
      	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.getRemoteSymbolicReferences(CliGitAPIImpl.java:2769)
      	at jenkins.plugins.git.AbstractGitSCMSource.retrieveActions(AbstractGitSCMSource.java:804)
      	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)
      

      Rolling back to the old version, fixes the issue.

            markewaite Mark Waite
            nitram Martin Karing
            Votes:
            6 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: