| Summary: | Cloning GIT repository fails because it couldn't delete file index.lock | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Bojan Siljanovski <bojans> | ||||
| Component: | Core | Assignee: | Project Inbox <egit.core-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | caniszczyk, gordon.vidaver, matthias.sohn, mterber, okoehler1, poopsmith, robin.rosenberg, sslavic | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 0.12 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Bojan Siljanovski
Can you try with the latest nightly build? Also, can you give us a stacktrace? This failed for me too, when creating from a bundle. I don't have Kaspersky but McAfee. I'd put this under "major" since I can't create a project from a bundle. Which version of EGit/JGit? Can you post a stacktrace? EGit 0.11.1 !MESSAGE Git repository clone failed. !STACK 0 java.io.IOException: Could not delete file C:\Users\go22670\mt_repo\goodwave\gw\gw_bundle\.git\index.lock at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:134) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:142) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:259) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:252) at org.eclipse.egit.ui.internal.clone.GitCloneWizard$3.run(GitCloneWizard.java:216) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Can you try with the latest version of EGit, 0.12? http://download.eclipse.org/egit/updates-0.12 After updating to egit 0.12.1 eclipse.buildId=M20110210-1200 java.version=1.6.0_21 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product Error Thu May 05 16:07:30 EDT 2011 Git repository clone failed. java.io.IOException: Could not delete file C:\Users\go22670\mt_repo\goodwave\gw\gw_bundle_3\goodwave.bundle\.git\index.lock at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:134) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:150) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:291) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:284) at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:248) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Any thoughts on this Matthias? I've been hit by this same unwanted behavior, when trying to clone JiBX repo ( git://jibx.git.sourceforge.net/gitroot/jibx/jibx ) cloning fails with [1]. I'm using egit 0.12.1, eclipse 3.6 SR2 (build 20110218-0911), Sun/Oracle JDK 1.6 update 25 x64, on both Windows 7 x64 and Windows Vista Business x64 SP1. On both systems there is different antivirus, and turning it of didn't help with this issue. After cloning fails, if I try manually to delete jibx/.git/index.lock file, I can do it. Regards, Stevo. [1] Jibx repo clone error !ENTRY org.eclipse.egit.ui 4 0 2011-06-05 13:27:41.172 !MESSAGE Could not delete file C:\Users\s.slavic\jibx\.git\index.lock !STACK 0 java.io.IOException: Could not delete file C:\Users\s.slavic\jibx\.git\index.lock at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:134) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:150) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:291) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:284) at org.eclipse.egit.ui.internal.clone.GitCloneWizard$5.run(GitCloneWizard.java:265) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) If I understand well, "run" method in CloneOperation will try to clean up working directory (clone destination I guess) after a failure is encountered (Exception gets thrown during cloning) (see http://egit.eclipse.org/w/?p=egit.git;a=blob;f=org.eclipse.egit.core/src/org/eclipse/egit/core/op/CloneOperation.java;h=c75bde69c9015ead9b3f436dbed1097902b89a4a;hb=HEAD ). Original error doesn't get logged before trying to delete working directory. Something else is actually preventing cloning to complete, and all we see is stacktrace from a different error following primary error. Hello, got same Error Message with latest version (0.12.1) Stacktrace is nearly the same on a Windows OS in EGit as from Gordon Vidaver 2011-05-05 14:59:43 EDT post. Git on cygwin can clone the whole repository. Problem might be the including the leading spaces. Example: ...\src\ java sample \test\Test.java Leading spaces aren't best practise and make life more complicated because at least a Unix emulation like Cygwin is needed. Not all people are free to use a Unix style OS. Stacktrace: Folgende Fehlermeldung: eclipse.buildId=M20110210-1200 java.version=1.6.0_07 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product -clean -data C:\projekte\copypaste351 Error Tue Jul 12 10:38:49 CEST 2011 Git repository clone failed. java.io.IOException: Could not delete file C:\develop\eclipse3.6.2_git\gitrepo\basis2\.git\index.lock at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:134) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:151) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:292) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:285) at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:249) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Created attachment 200407 [details]
Eclipse Error Log
Hi, same behaviour to me. Win7 64Bit. No spaces in full-foldername. java.io.IOException: Could not delete file C:\Users\Dev\repo.git\.git\index.lock at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:134) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:119) at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:142) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:259) at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:252) at org.eclipse.egit.ui.internal.clone.GitCloneWizard$3.run(GitCloneWizard.java:216) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Regards Oliver could you try to identify the process holding a file lock which prevents egit to delete index.lock, refer to [1] which tools could be used for that. [1] http://www.thefreecountry.com/utilities/deletelockedfiles.shtml I figured out one reason/cause why this might be happening on Windows: the repo contains files with unacceptable filenames e.g. '*.jpg' or '&.jpg'. (It's always a good idea to run 'git clone' in the default console and read the error message if there is any. That's how I figured out this.) I this still valid? this is fixed since 0.12 with egit commit f3108b59f9e9059cc2e3032ae62cf51a57286285 which ensures that the repository is closed before calling FileUtils.delete is called. Note this can only happens if CloneOperation fails. |