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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • gitlab-plugin
    • None

      When we merge with squash commit Jenkins fail with the following error
      `

       

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

      However when we merge without squash commit, pipeline runs successful
      This issue happen when we checkout using gitlab plugin and below is the Jenkins checkout script

      checkout changelog: true, poll: true, scm: [
      $class: 'GitSCM',
      branches: [[name: "origin/${env.gitlabSourceBranch}"]],
      doGenerateSubmoduleConfigurations: false,
      extensions: [],
      submoduleCfg: [],
      userRemoteConfigs: [[
      credentialsId: "gitlab-ssh",
      url: gitlabTargetRepoSshUrl
      ]]
      ]}}

      {{}}

      But when we merge without squash commit the build is successful. 

      Please can you advise?

            jequals5 Marky Jackson
            petre7 Peter Asuelimen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: