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

git checkout not working with multibranch on jenkins:2.121.2-alpine

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate
    • Component/s: git-plugin, ssh-plugin
    • Labels:
      None
    • Environment:
      docker: jenkins/jenkins:2.121.2-alpine
    • Similar Issues:

      Description

      git checkout with multibranch pipeline project is not working after upgrade to 2.121.2.
      git checkout with normal pipeline project works (with same ssh credentials)
      reverting to 2.121.1 fixes the problem (but is no long-term solution)

      [Tue Jul 24 12:58:47 CEST 2018] Starting branch indexing...
       > git --version # timeout=10
      using GIT_SSH to set credentials SSH credentials zum Auschecken von Code
       > git ls-remote --symref ssh://git@IP_blanked/Name_Blanked.git # timeout=10
       > git rev-parse --is-inside-work-tree # timeout=10
      Setting origin to ssh://git@IP_blanked/Name_Blanked.git
       > git config remote.origin.url ssh://git@IP_blanked/Name_Blanked.git # timeout=10
      Fetching & pruning origin...
      Fetching upstream changes from origin
       > git --version # timeout=10
      using GIT_SSH to set credentials SSH credentials zum Auschecken von Code
       > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune
      ERROR: [Tue Jul 24 12:58:47 CEST 2018] Could not fetch branches from source 8e33d544-92b6-4bf0-ac8f-bb4e9bfd13c2
      hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune" returned status code 128:
      stdout: 
      stderr: build@IP_blanked: 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:2002)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1721)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
      	at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:351)
      	at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:539)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:357)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:267)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:633)
      	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:1024)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      [Tue Jul 24 12:58:47 CEST 2018] Finished branch indexing. Indexing took 0.49 sec
      FATAL: Failed to recompute children of firmware-binaries.branches.integration
      hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune" returned status code 128:
      stdout: 
      stderr: build@IP_blanked: 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:2002)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1721)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
      	at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:351)
      	at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:539)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:357)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:267)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:633)
      	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:1024)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
      

      Alpine Linux 3.8 includes OpenSSH 7.7. OpenSSH 7.7 made an intentional behavioral change that broke the git client plugin in ssh authentication cases. Git client plugin 2.7.2 fixed several of those cases but missed cases that were specifically running on the master (like multibranch pipeline fetch and pipeline fetch). See JENKINS-50573 for more details.

        Attachments

          Issue Links

            Activity

            Hide
            markewaite Mark Waite added a comment -

            Thanks for the report. This is a duplicate of JENKINS-50573. Please test drive the pre-release build of git client plugin 2.7.3 to confirm it solves the issue.

            Show
            markewaite Mark Waite added a comment - Thanks for the report. This is a duplicate of JENKINS-50573 . Please test drive the pre-release build of git client plugin 2.7.3 to confirm it solves the issue.
            Hide
            markewaite Mark Waite added a comment -

            Included in git client plugin 2.7.3 and git client plugin 3.0.0-beta4 released 24 July 2018.

            Show
            markewaite Mark Waite added a comment - Included in git client plugin 2.7.3 and git client plugin 3.0.0-beta4 released 24 July 2018.

              People

              • Assignee:
                markewaite Mark Waite
                Reporter:
                nolange79 Norbert Lange
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: