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

Branch Indexing of username/password protected repository fails

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
    • Environment:
      git-plugin: 3.6.2
      Jenkins: 2.86
      Windows Server 2012 R2
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            bv2017 Björn Voß added a comment -

            Mark Waite I ran in the exact same problem and the snapshot fixed it.

            A fast bugfix release would be great

            Show
            bv2017 Björn Voß added a comment - Mark Waite I ran in the exact same problem and the snapshot fixed it. A fast bugfix release would be great
            Hide
            markewaite Mark Waite added a comment -

            Thanks for helping Björn Voß. I'll create the release.

            Show
            markewaite Mark Waite added a comment - Thanks for helping Björn Voß . I'll create the release.
            Hide
            markewaite Mark Waite added a comment -

            Included in git plugin 3.6.3 released 26 Oct 2017

            Show
            markewaite Mark Waite added a comment - Included in git plugin 3.6.3 released 26 Oct 2017
            Hide
            nitram Martin Karing added a comment -

            git plugin version 3.6.3 works again. Good job Stephen Connolly.

            Show
            nitram Martin Karing added a comment - git plugin version 3.6.3 works again. Good job Stephen Connolly .
            Hide
            lukelast Luke Last added a comment -

            Yay fixed!

            Show
            lukelast Luke Last added a comment - Yay fixed!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: