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

Checkout fails with Multiple SCMs plugin on commit notification

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 1.568
      multiple-scms-plugin 0.4-beta-1
      git-plugin 2.3.5-SNAPSHOT
    • Similar Issues:

      Description

      also similar to https://github.com/janinko/ghprb/issues/171

      Setup:

      • free style project
      • multiple scms repository setting
      • two git repositories configured
      • stash notifications for both repositories
      • a commit is pushed to second repository

      Build console output:

      commit notification 108127644b30e28d326702752aa1150e05227156
      [EnvInject] - Loading node environment variables.
      [EnvInject] - Preparing an environment for the build.
      [EnvInject] - Keeping Jenkins system variables.
      [EnvInject] - Keeping Jenkins build variables.
      [EnvInject] - Injecting as environment variables the properties content 
      [EnvInject] - Variables injected successfully.
      [EnvInject] - Injecting contributions.
      Building on master in workspace /home/jenkins/workspace/TestNotification
       > /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > /usr/local/bin/git config remote.origin.url ssh://git@git.mydomain.com:7999/project/repo1.git # timeout=10
      Fetching upstream changes from ssh://git@git.mydomain.com:7999/project/repo1.git
       > /usr/local/bin/git --version # timeout=10
       > /usr/local/bin/git -c core.askpass=true fetch --tags --progress ssh://git@git.mydomain.com:7999/project/repo1.git +refs/heads/*:refs/remotes/origin/*
       > /usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit} # timeout=10
      FATAL: Command "/usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit}" returned status code 128:
      stdout: 108127644b30e28d326702752aa1150e05227156^{commit}
      
      stderr: fatal: ambiguous argument '108127644b30e28d326702752aa1150e05227156^{commit}': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions, like this:
      'git <command> [<revision>...] -- [<file>...]'
      
      hudson.plugins.git.GitException: Command "/usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit}" returned status code 128:
      stdout: 108127644b30e28d326702752aa1150e05227156^{commit}
      
      stderr: fatal: ambiguous argument '108127644b30e28d326702752aa1150e05227156^{commit}': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions, like this:
      'git <command> [<revision>...] -- [<file>...]'
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1457)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1433)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1429)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1117)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1127)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:523)
      	at hudson.plugins.git.GitAPI.revParse(GitAPI.java:258)
      	at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:85)
      	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:872)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:985)
      	at hudson.scm.SCM.checkout(SCM.java:488)
      	at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
      	at hudson.model.Run.execute(Run.java:1732)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:234)
      

      More detailed steps for reproduction:

      • download latest jenkins and start it
      • install GIT Plugin
      • install Multiple SCMs plugin
      • create freestyle project like in screenshots
      • unpack attached repos to ~ (if you choose different directory, you will need to modify job config and the url)
      • call http://<host>:<port>/git/notifyCommit?sha1=ba2ab18cf2323b131777b380f53137491e11d136&url=%7E%2FJENKINS-26587%2Frepo2

        Attachments

          Activity

          toypoodle Vasili Kvockin created issue -
          toypoodle Vasili Kvockin made changes -
          Field Original Value New Value
          Component/s git-plugin [ 15543 ]
          markewaite Mark Waite made changes -
          Assignee Kevin Bell [ kbell ] Mark Waite [ markewaite ]
          toypoodle Vasili Kvockin made changes -
          Description also similar to https://github.com/janinko/ghprb/issues/171

          Setup:

          * free style project
          * multiple scms repository setting
          * two git repositories configured
          * stash notifications for both repositories
          * a commit is pushed to second repository

          Build console output:
          {code}
          commit notification 108127644b30e28d326702752aa1150e05227156
          [EnvInject] - Loading node environment variables.
          [EnvInject] - Preparing an environment for the build.
          [EnvInject] - Keeping Jenkins system variables.
          [EnvInject] - Keeping Jenkins build variables.
          [EnvInject] - Injecting as environment variables the properties content
          [EnvInject] - Variables injected successfully.
          [EnvInject] - Injecting contributions.
          Building on master in workspace /home/jenkins/workspace/TestNotification
           > /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > /usr/local/bin/git config remote.origin.url ssh://git@git.mydomain.com:7999/project/repo1.git # timeout=10
          Fetching upstream changes from ssh://git@git.mydomain.com:7999/project/repo1.git
           > /usr/local/bin/git --version # timeout=10
           > /usr/local/bin/git -c core.askpass=true fetch --tags --progress ssh://git@git.mydomain.com:7999/project/repo1.git +refs/heads/*:refs/remotes/origin/*
           > /usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit} # timeout=10
          FATAL: Command "/usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit}" returned status code 128:
          stdout: 108127644b30e28d326702752aa1150e05227156^{commit}

          stderr: fatal: ambiguous argument '108127644b30e28d326702752aa1150e05227156^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'

          hudson.plugins.git.GitException: Command "/usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit}" returned status code 128:
          stdout: 108127644b30e28d326702752aa1150e05227156^{commit}

          stderr: fatal: ambiguous argument '108127644b30e28d326702752aa1150e05227156^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'

          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1457)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1433)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1429)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1117)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1127)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:523)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:258)
          at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:85)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:872)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:985)
          at hudson.scm.SCM.checkout(SCM.java:488)
          at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
          at hudson.model.Run.execute(Run.java:1732)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:234)
          {code}
          also similar to https://github.com/janinko/ghprb/issues/171

          Setup:

          * free style project
          * multiple scms repository setting
          * two git repositories configured
          * stash notifications for both repositories
          * a commit is pushed to second repository

          Build console output:
          {code}
          commit notification 108127644b30e28d326702752aa1150e05227156
          [EnvInject] - Loading node environment variables.
          [EnvInject] - Preparing an environment for the build.
          [EnvInject] - Keeping Jenkins system variables.
          [EnvInject] - Keeping Jenkins build variables.
          [EnvInject] - Injecting as environment variables the properties content
          [EnvInject] - Variables injected successfully.
          [EnvInject] - Injecting contributions.
          Building on master in workspace /home/jenkins/workspace/TestNotification
           > /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > /usr/local/bin/git config remote.origin.url ssh://git@git.mydomain.com:7999/project/repo1.git # timeout=10
          Fetching upstream changes from ssh://git@git.mydomain.com:7999/project/repo1.git
           > /usr/local/bin/git --version # timeout=10
           > /usr/local/bin/git -c core.askpass=true fetch --tags --progress ssh://git@git.mydomain.com:7999/project/repo1.git +refs/heads/*:refs/remotes/origin/*
           > /usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit} # timeout=10
          FATAL: Command "/usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit}" returned status code 128:
          stdout: 108127644b30e28d326702752aa1150e05227156^{commit}

          stderr: fatal: ambiguous argument '108127644b30e28d326702752aa1150e05227156^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'

          hudson.plugins.git.GitException: Command "/usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit}" returned status code 128:
          stdout: 108127644b30e28d326702752aa1150e05227156^{commit}

          stderr: fatal: ambiguous argument '108127644b30e28d326702752aa1150e05227156^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'

          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1457)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1433)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1429)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1117)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1127)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:523)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:258)
          at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:85)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:872)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:985)
          at hudson.scm.SCM.checkout(SCM.java:488)
          at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
          at hudson.model.Run.execute(Run.java:1732)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:234)
          {code}


          More detailed steps for reproduction:
          * download latest jenkins and start it
          * install GIT Plugin
          * install Multiple SCMs plugin
          * create freestyle project like in screenshots
          * unpack attached repos to ~ (if you choose different directory, you will need to modify job config and the url)
          * call http://&lt;host&gt;:&lt;port&gt;/git/notifyCommit?sha1=ba2ab18cf2323b131777b380f53137491e11d136&url=%7E%2FJENKINS-26587%2Frepo2
           
          toypoodle Vasili Kvockin made changes -
          markewaite Mark Waite made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          markewaite Mark Waite made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Mark Waite [ markewaite ]
          markewaite Mark Waite made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 160659 ] JNJira + In-Review [ 196512 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              toypoodle Vasili Kvockin
            • Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: