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

git plugin should automatically remove .git/index.lock if the job is killed

    Details

    • Similar Issues:

      Description

      Git will create a .git/index.lock file when it is executing. If the job is killed, the git process is killed, and therefore the lock file is left over. All subsequent attempts to run git in that workspace on that machine will fail.

      One solution is to delete this file in the post-build task of the job automatically.

        Attachments

          Issue Links

            Activity

            Hide
            bchew Benny Chew added a comment -

            Was wondering on the progress of this issue.. we get this issue when the job is aborted when git is executing. The workaround works, but I guess isn't ideal as it would've to be added to every job separately (and would require separate delete commands for linux/windows). Cheers!

            Show
            bchew Benny Chew added a comment - Was wondering on the progress of this issue.. we get this issue when the job is aborted when git is executing. The workaround works, but I guess isn't ideal as it would've to be added to every job separately (and would require separate delete commands for linux/windows). Cheers!
            Hide
            samplusplus Samuel Haddad added a comment -

            I am also looking to see if there has been update on this issue?

            Show
            samplusplus Samuel Haddad added a comment - I am also looking to see if there has been update on this issue?
            Hide
            ndeloof Nicolas De Loof added a comment -

            aborting the build process as git is running will leave the working copy in a bad state, so require to clean workspace first. Just removing the lock isn't safe enough.

            Show
            ndeloof Nicolas De Loof added a comment - aborting the build process as git is running will leave the working copy in a bad state, so require to clean workspace first. Just removing the lock isn't safe enough.
            Hide
            rschulz Roland Schulz added a comment -

            With "Clean after checkout" it should be safe to delete the lock file. And even if you don't like that option, their should be a way to clean the workspace if a lock file exists.

            Show
            rschulz Roland Schulz added a comment - With "Clean after checkout" it should be safe to delete the lock file. And even if you don't like that option, their should be a way to clean the workspace if a lock file exists.

              People

              • Assignee:
                Unassigned
                Reporter:
                bnovc bnovc
              • Votes:
                26 Vote for this issue
                Watchers:
                27 Start watching this issue

                Dates

                • Created:
                  Updated: