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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • git-plugin, ssh-plugin
    • None
    • docker: jenkins/jenkins:2.121.2-alpine

      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.

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

              Created:
              Updated:
              Resolved: