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

            bnovc bnovc created issue -
            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.
            ndeloof Nicolas De Loof made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Won't Fix [ 2 ]
            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.
            rschulz Roland Schulz made changes -
            Resolution Won't Fix [ 2 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            ronmacneil_ice Ron MacNeil made changes -
            Link This issue is related to JENKINS-25353 [ JENKINS-25353 ]
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-35648 [ JENKINS-35648 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 142879 ] JNJira + In-Review [ 186042 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-37037 [ JENKINS-37037 ]
            markewaite Mark Waite made changes -
            Link This issue is related to JENKINS-47652 [ JENKINS-47652 ]
            markewaite Mark Waite made changes -
            Component/s git-client-plugin [ 17423 ]
            Component/s git-plugin [ 15543 ]
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-47652 [ JENKINS-47652 ]
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-25353 [ JENKINS-25353 ]
            markewaite Mark Waite made changes -
            Status Reopened [ 4 ] Open [ 1 ]
            markewaite Mark Waite made changes -
            Assignee Andrew Bayer [ abayer ]

              People

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

                Dates

                • Created:
                  Updated: