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

Single commit checkouts don't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • git-plugin
    • None
    • Jenkins ver. 1.639
      Git Plugin 2.4.0
      CentOS 6.6
      Various Git Versions, see description

      if you click on the "?" beside the "Branch Specifier" field it says:

      "<commitId>
      Checks out the specified commit.
      E.g. 5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... "
      

      However, if I simply enter the commit SHA1, the build fails:

      Fetching upstream changes from https://gitlab.example.com/example/MyProject.git
      using .gitcredentials to set credentials
       > git config --local credential.username michael.overmeyer # timeout=10
       > git config --local credential.helper store --file=/tmp/git1815754778988371419.credentials # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://gitlab.example.com/example/MyProject.git +refs/heads/*:refs/remotes/origin/*
       > git config --local --remove-section credential # timeout=10
       > git rev-parse 47622f3fc7cbfeaafbc936c51ee2ec7856d67594^{commit} # timeout=10
       > git rev-parse origin/47622f3fc7cbfeaafbc936c51ee2ec7856d67594^{commit} # timeout=10
       > git rev-parse 47622f3fc7cbfeaafbc936c51ee2ec7856d67594^{commit} # timeout=10
      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
      Archiving artifacts
      

      As part of trying to debug, I tried running this command on the CLI:

      git rev-parse 47622f3fc7cbfeaafbc936c51ee2ec7856d67594^{commit}
      

      It fails on the command line for:

      • git version 1.8.3.1 (CentOS 7 git.x86_64 1.8.3.1-4.el7)
      • git version 2.6.2 (CentOS 6)

      But works on:

      • git version 1.7.1 (CentOS 6 git.x86_64 1.7.1-3.el6_4.1)

      Those are just the versions I've tested with.
      The docs state that "A recent Git runtime is required (1.7.9 minimum, 1.8.x recommended)"

      Perhaps this just hasn't been tested in some time?

            Unassigned Unassigned
            movermeyer Michael Overmeyer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: