Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Eternal problems when cloning with EGit(Can not clone a reputable repository using EGit)
Eternal problems when cloning with EGit [message #818206] Sun, 11 March 2012 07:48 Go to next message
Kamran Shamim is currently offline Kamran Shamim
Messages: 2
Registered: March 2012
Junior Member
Hello to all . Please can someone help?
I am glad to have installed EGit in my Eclipse Indigo installation. I am, however, new to the plugin and would appreciate some help.
Having looked in the forum I have found a reference to a similar problem, but the suggested action does not help.

I am a Windows XP SP3 user and, when cloning using the wizard, I get the following arror at the end (after a long wait at the end of the process:

Git repository clone failed.
Could not delete file D:\Mes documents\Git projects\oh-mainline\.git\objects\pack\pack-6afcd6c2e55aebf77b05015b9a86a08ca8bc2eeb.pack

Looking at the log, I find the following:

java.io.IOException: Could not delete file D:\Mes documents\Git projects\oh-mainline\.git\objects\pack\pack-6afcd6c2e55aebf77b05015b9a86a08ca8bc2eeb.pack
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.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:164)
at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.executeCloneOperation(AbstractGitCloneWizard.java:430)
at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.access$2(AbstractGitCloneWizard.java:424)
at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard$5.run(AbstractGitCloneWizard.java:386)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Session data:

eclipse.buildId=M20110909-1335
java.version=1.7.0_03
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Command-line arguments: -os win32 -ws win32 -arch x86


I have removed traces of the attempted clone respecting the order and used JStack, but the problem repeats itself.

Could someone please, please, please, assist me?

Kamran
Re: Eternal problems when cloning with EGit [message #818501 is a reply to message #818206] Sun, 11 March 2012 18:50 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 330
Registered: July 2009
Senior Member
From 32394af2fa7872ebd06b38a2426005d48cf1703a Mon Sep 17 00:00:00 2001
From: Robin Rosenberg <robin.rosenberg@dewire.com>
Date: Sun, 11 Mar 2012 19:49:04 +0100
Subject: [EGIT PATCH] Re-throw the original exception when cleanup from
failed clone fails

This better help the user in figuring out what went wrong.

Change-Id: If4f0a90f9a26529c4731016f9d4a0abd0e2414e6
---
.../src/org/eclipse/egit/core/CoreText.java | 3 +++
.../src/org/eclipse/egit/core/coretext.properties | 1 +
.../org/eclipse/egit/core/op/CloneOperation.java | 4 +++-
3 files changed, 7 insertions(+), 1 deletions(-)

Kamran Shamim skrev 2012-03-11 08.48:
> Hello to all . Please can someone help?
> I am glad to have installed EGit in my Eclipse Indigo installation. I am, however, new to the plugin and would appreciate some help. Having looked in the forum I have found
> a reference to a similar problem, but the suggested action does not help.
>
> I am a Windows XP SP3 user and, when cloning using the wizard, I get the following arror at the end (after a long wait at the end of the process:
>

The clone operation fails and then the cleanup fails too. The report you get is from the
failing cleanup yielding no clue to what caused the failed clone to begin with. Gerrit seems
down, but the following patch should make the clone operation tell you what the real problem
was. Anyone can push it gerrit when it wakes up, if I don't get to it first.

-- robin


diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/CoreText.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/CoreText.java
index 0bc3bb8..847df2b 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/CoreText.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/CoreText.java
@@ -213,6 +213,9 @@
public static String CloneOperation_checkingOutFiles;

/** */
+ public static String CloneOperation_failed_cleanup;
+
+ /** */
public static String CloneOperation_initializingRepository;

/** */
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/coretext.properties b/org.eclipse.egit.core/src/org/eclipse/egit/core/coretext.properties
index 948aac3..b7d211d 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/coretext.properties
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/coretext.properties
@@ -89,6 +89,7 @@ GitProjectSetCapability_ExportCouldNotGetBranch=Could not get current branch fro
GitProjectSetCapability_ExportNoRemote=No remote URL configured for current branch in repository of project {0}.

CloneOperation_checkingOutFiles=Checking out files
+CloneOperation_failed_cleanup=Clone operation failed, with failed cleanup: {0}. Manual cleanup may be required.
CloneOperation_initializingRepository=Initializing local repository
CloneOperation_title=Cloning from {0}
CloneOperation_writingIndex=Writing index
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CloneOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CloneOperation.java
index 6092da3..d6ab575 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CloneOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CloneOperation.java
@@ -163,7 +163,9 @@ public void run(final IProgressMonitor pm)
repository.close();
FileUtils.delete(workdir, FileUtils.RECURSIVE);
} catch (IOException ioe) {
- throw new InvocationTargetException(ioe);
+ throw new InvocationTargetException(e, NLS.bind(
+ CoreText.CloneOperation_failed_cleanup,
+ ioe.getLocalizedMessage()));
}
if (monitor.isCanceled())
throw new InterruptedException();
--
1.7.9.rc0.28.g0e1c
Re: Eternal problems when cloning with EGit [message #819808 is a reply to message #818501] Tue, 13 March 2012 10:49 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew Webber
Messages: 198
Registered: December 2010
Senior Member
Interesting. I opened a ticket for the Buckminster component, for a problem where a failed clone was not cleaned up: https://bugs.eclipse.org/bugs/show_bug.cgi?id=373071.

At the time, I suspected it might be a JGit problem rather than a Buckminster problem - feel free to re-assign if you think that's appropriate.

Matthew
Re: Eternal problems when cloning with EGit [message #820834 is a reply to message #819808] Wed, 14 March 2012 16:22 Go to previous messageGo to next message
Kamran Shamim is currently offline Kamran Shamim
Messages: 2
Registered: March 2012
Junior Member
Flattering and a relief to see that my problem is receiving attention. Thank you Robin and Matthew.
I must admit that I am a bit lost, especially with Robin's post. Any suggestions on how I can advance, or should I just wait and see?
If so, can you suggest an alternative to using the EGit plug-in? I really have no desire to use shell for Git and wish to continue in the Eclipse environment.

Kamran
Re: Eternal problems when cloning with EGit [message #822215 is a reply to message #820834] Fri, 16 March 2012 10:06 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian Halstrick
Messages: 106
Registered: July 2009
Senior Member
Robin proposed a change in EGit which would give more information about the cause of your error. Meanwhile this change has been accepted. I suggest you update EGit from http://download.eclipse.org/egit/updates-nightly/ and retry the use case. It will still fail - but we have better log output.

Ciao
Chris
Re: Eternal problems when cloning with EGit [message #824166 is a reply to message #822215] Mon, 19 March 2012 10:41 Go to previous message
Matthew Webber is currently offline Matthew Webber
Messages: 198
Registered: December 2010
Senior Member
My problem (in the bugzilla referenced above) is that I know the cause of the error (authentication failure), but JGit does not clean up the incomplete clone.
Matthew
Previous Topic:I can't import from github
Next Topic:Remote Tracking Branch Issues
Goto Forum:
  


Current Time: Mon Oct 20 21:27:31 GMT 2014

Powered by FUDForum. Page generated in 0.02762 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software