Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Using EGit - basics
Using EGit - basics [message #8609] Thu, 11 June 2009 03:59 Go to next message
Jay Strauss is currently offline Jay StraussFriend
Messages: 2
Registered: July 2009
Junior Member
Hi, sorry I'm a total noob.

I'm just starting to play with eclipse (Version: 3.4.2) and GIT (1.6.3)
and EGIT (0.4.0 I think). I don't seem to be able to "add" or "commit"
within eclipse (after installing the EGIT plugin).

When I try to "add" an "(untracked)" file via Team->Track(add) I get an
empty popup with an "OK" button. It looks like the title says "Track
fa..." which I'm guessing is "track failed"

If add the file using GIT from the command line, EGIT recognizes the
change and removes the "(untracked)". If I go ahead and now try to
commit, I get the error: Error occurred while committing Reason: Writing
trees.

Am I doing something wrong, or are these functionalities missing at this
point?

Thanks for the help
Jay
Re: Using EGit - basics [message #8620 is a reply to message #8609] Thu, 11 June 2009 20:12 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Jay Strauss wrote:

> Hi, sorry I'm a total noob.
>
> I'm just starting to play with eclipse (Version: 3.4.2) and GIT (1.6.3)
> and EGIT (0.4.0 I think). I don't seem to be able to "add" or "commit"
> within eclipse (after installing the EGIT plugin).
>
> When I try to "add" an "(untracked)" file via Team->Track(add) I get an
> empty popup with an "OK" button. It looks like the title says "Track
> fa..." which I'm guessing is "track failed"

More like "WTF".. :)

> If add the file using GIT from the command line, EGIT recognizes the
> change and removes the "(untracked)". If I go ahead and now try to
> commit, I get the error: Error occurred while committing Reason: Writing
> trees.
>
> Am I doing something wrong, or are these functionalities missing at this
> point?

This should work. Look in the error log for detail and we also need to
know the path of the file you want to track, and the location of the .git
directory.

-- robin
Re: Using EGit - basics [message #481587 is a reply to message #8620] Fri, 21 August 2009 16:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.johnandcailin.com

I also see this same behavior.

When I try to do Team -> Add to Version Control on any file, I get a popup
error window that is empty. The title of the error window is "Track fail".

No corresponding error message appears in the Eclipse error log (at
metadata/.plugins/org.eclipse.ui.workbench/log).

I see this same behavior on both Eclipse 3.4 and Eclipse 3.5.
Re: Using EGit - basics [message #481603 is a reply to message #481587] Fri, 21 August 2009 17:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.johnandcailin.com

Sorry, I also should have mentioned the following :

1. This is eGit on Windows Vista with either Eclipse 3.4 and Eclipse 3.5

2. The directory structure is as follows

EclipseWorkRoot
/git-demo
.git
README.txt
/demo
README.txt


I can't add either of the README.txt or the /demo folder to source control.

The internals of my .git directory look healthy, showing all the usual
sub-directories.
Re: Using EGit - basics [message #481617 is a reply to message #481587] Fri, 21 August 2009 21:34 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Cailin Nelson wrote:

> I also see this same behavior.
>
> When I try to do Team -> Add to Version Control on any file, I get a popup
> error window that is empty. The title of the error window is "Track
> fail".
>
> No corresponding error message appears in the Eclipse error log (at
> metadata/.plugins/org.eclipse.ui.workbench/log).
>
> I see this same behavior on both Eclipse 3.4 and Eclipse 3.5.

I see logging goes to stdout... (very old code). Could you try starting
eclipse with a cmd windows, i.e. eclipsec.exe and see what its says?

-- robin
Re: Using EGit - basics [message #483284 is a reply to message #481617] Mon, 31 August 2009 21:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.johnandcailin.com

Sorry for the delayed reply (vacation). I've followed your instructions
and run eclipsec.exe on the command line. I see the following :

2009-08-31 10:38:12.144::INFO: jetty-6.1.11
2009-08-31 10:38:12.146::INFO: Started SocketConnector@127.0.0.1:8501
2009-08-31 10:38:12.153::INFO: Started SocketConnector@127.0.0.1:8601
org.spearce.jgit.errors.ObjectWritingException: Unable to create new
object: M:\
WorkRoot\git-demo\.git\objects\e6\9de29bb2d1d6434b8b29ae775a d8c2e48c5391
at
org.spearce.jgit.lib.ObjectWriter.writeObject(ObjectWriter.j ava:397)
at
org.spearce.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:128)
at
org.spearce.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:110)
at org.spearce.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:385)
at org.spearce.jgit.lib.GitIndex.add(GitIndex.java:167)
at
org.eclipse.egit.core.op.TrackOperation.run(TrackOperation.j ava:117)
at org.eclipse.egit.ui.internal.actions.Track$1.run(Track.java: 41)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(Modal
Context.java:121)
Re: Using EGit - basics [message #483461 is a reply to message #483284] Tue, 01 September 2009 06:45 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Cailin Nelson wrote:

> Sorry for the delayed reply (vacation). I've followed your instructions
> and run eclipsec.exe on the command line. I see the following :
>
> 2009-08-31 10:38:12.144::INFO: jetty-6.1.11
> 2009-08-31 10:38:12.146::INFO: Started SocketConnector@127.0.0.1:8501
> 2009-08-31 10:38:12.153::INFO: Started SocketConnector@127.0.0.1:8601
> org.spearce.jgit.errors.ObjectWritingException: Unable to create new
> object: M:\
> WorkRoot\git-demo\.git\objects\e6\9de29bb2d1d6434b8b29ae775a d8c2e48c5391
> at
> org.spearce.jgit.lib.ObjectWriter.writeObject(ObjectWriter.j ava:397)
> at
> org.spearce.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:128)
> at
> org.spearce.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:110)
> at org.spearce.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:385)
> at org.spearce.jgit.lib.GitIndex.add(GitIndex.java:167)
> at
> org.eclipse.egit.core.op.TrackOperation.run(TrackOperation.j ava:117)
> at org.eclipse.egit.ui.internal.actions.Track$1.run(Track.java: 41)
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(Modal
> Context.java:121)

What paths exists below M:}\WorkRoot\git-demo? Maybe the repo creation
failed. Obviously we need better error handling here.

Can you create that path manually? Delete it afterwards. I guess M: here is
a network drive of some sort.

-- robin
Re: Using EGit - basics [message #484970 is a reply to message #483461] Thu, 10 September 2009 03:55 Go to previous messageGo to next message
Cailin Nelson is currently offline Cailin NelsonFriend
Messages: 5
Registered: September 2009
Junior Member
The .git directory is already there and seems to be in working order.

However - your comment about M: being a network drive gave me an idea.

M: is actually a Samba share to my Linux box. I've been running in this config (Eclipse on Windows, writing to Linux directories via Samba) for years without any trouble - using both the CVS and SVN Eclipse functionality.

But - there seems to be something that the EGit plugin doesn't like about the Samba share! My problems went away when I tested on a straight up Windows directory on my C: drive.

Anyway, thanks for the help, and I'll try and puzzle out what ridiculous Samba config needs tweaking on my own.
Re: Using EGit - basics [message #500970 is a reply to message #484970] Mon, 30 November 2009 14:32 Go to previous messageGo to next message
Frank  is currently offline Frank Friend
Messages: 2
Registered: November 2009
Junior Member
I have exactly the same problem.. egit works allright locally on C: but if my project is at a networked drive either using a mapped path like S: or using \\server\share I get an empty popup error message.

Using Zend studio 7.0.2 (eclipse platform 3.5.0 I believe) and

Egit 0.6.0.200911171911
Re: Using EGit - basics [message #506518 is a reply to message #500970] Thu, 07 January 2010 15:00 Go to previous messageGo to next message
Chris K is currently offline Chris KFriend
Messages: 2
Registered: January 2010
Junior Member
I have the exact same problem

EGit 0.6.0.200912061443
JGit 0.5.0.200912061441
Eclipse 3.5 Build 20090920-1017

This worked splendidly under 3.4, and it fails on my local drives, E: and C:

It fails to recognize that the project has been added to a repository.

Re: Using EGit - basics [message #509157 is a reply to message #8609] Thu, 21 January 2010 14:38 Go to previous messageGo to next message
Robert de Wilde is currently offline Robert de WildeFriend
Messages: 6
Registered: January 2010
Junior Member
I have the same problems using Eclipse with EGit on Windows XP. Very annoying, but ok. If additional information is required, just ask.

Same situation, got a samba share. Gives some additional clues when trying to commit:

Error during commit
Reason:
Committing changes
Unable to create new object Z:\my\path\project\.git\object\44\8496808a58e224....

Other GIT tools have no problem pushing, pulling, cloning?

Seems related;
http://code.google.com/p/nbgit/issues/detail?id=42
http://code.google.com/u/senotrusov/updates


Other errors were about "Auth failed" on the server (/var/log/secure);
Received disconnect from ... com.jcraft.jsch.JschException: Auth fail;
This patch for Ant may be closely related:
http://marc.info/?l=ant-dev&m=111959408515300&w=2
But I can't relate it to the specific Samba issue, so maybe misleading.


Context; I publish the userhomes as Samba-shares including a 'www' working directory which is defined as Userdir in Apache HttpD. Users can checkout their working copies into 'www', test it on the remote server (so same config). When checked they'll commit and it'll show up on the main webserver path. Great when combined with XDebug if working in PHP Smile
This bug seems to break the plan Sad

[Updated on: Wed, 27 January 2010 15:41]

Report message to a moderator

icon4.gif  Re: Using EGit - basics [message #511107 is a reply to message #8609] Fri, 29 January 2010 21:36 Go to previous messageGo to next message
Robert de Wilde is currently offline Robert de WildeFriend
Messages: 6
Registered: January 2010
Junior Member
Check for possible solution:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=301213
Re: Using EGit - basics [message #511424 is a reply to message #8609] Mon, 01 February 2010 15:20 Go to previous messageGo to next message
Jimbolino  is currently offline Jimbolino Friend
Messages: 2
Registered: February 2010
Junior Member
Hi,

I too have the same problem.

EGit: 0.6.0.201001232236

The problem appears when i chose "Add to Version Control"

An error box "Track failed", without further text appears.

Eclipsec.exe output:
org.eclipse.jgit.errors.ObjectWritingException: Unable to create new object: Z:\www\test\.git\objects\f6\d7651e2766bcf93301b09bd3fb5de06a8f8ec9
        at org.eclipse.jgit.lib.ObjectWriter.writeObject(ObjectWriter.java:398)
        at org.eclipse.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.java:125)
        at org.eclipse.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.java:107)
        at org.eclipse.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:385)
        at org.eclipse.jgit.lib.GitIndex.add(GitIndex.java:167)
        at org.eclipse.egit.core.op.TrackOperation.run(TrackOperation.java:117)
        at org.eclipse.egit.ui.internal.actions.Track$1.run(Track.java:41)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)


I've tried the changes to the samba config, but they don't seem to work.
Re: Using EGit - basics [message #572964 is a reply to message #8609] Thu, 11 June 2009 20:12 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Jay Strauss wrote:

> Hi, sorry I'm a total noob.
>
> I'm just starting to play with eclipse (Version: 3.4.2) and GIT (1.6.3)
> and EGIT (0.4.0 I think). I don't seem to be able to "add" or "commit"
> within eclipse (after installing the EGIT plugin).
>
> When I try to "add" an "(untracked)" file via Team->Track(add) I get an
> empty popup with an "OK" button. It looks like the title says "Track
> fa..." which I'm guessing is "track failed"

More like "WTF".. :)

> If add the file using GIT from the command line, EGIT recognizes the
> change and removes the "(untracked)". If I go ahead and now try to
> commit, I get the error: Error occurred while committing Reason: Writing
> trees.
>
> Am I doing something wrong, or are these functionalities missing at this
> point?

This should work. Look in the error log for detail and we also need to
know the path of the file you want to track, and the location of the .git
directory.

-- robin
Re: Using EGit - basics [message #573894 is a reply to message #8620] Fri, 21 August 2009 16:40 Go to previous messageGo to next message
Cailin Nelson is currently offline Cailin NelsonFriend
Messages: 5
Registered: September 2009
Junior Member
I also see this same behavior.

When I try to do Team -> Add to Version Control on any file, I get a popup
error window that is empty. The title of the error window is "Track fail".

No corresponding error message appears in the Eclipse error log (at
metadata/.plugins/org.eclipse.ui.workbench/log).

I see this same behavior on both Eclipse 3.4 and Eclipse 3.5.
Re: Using EGit - basics [message #573910 is a reply to message #481587] Fri, 21 August 2009 17:54 Go to previous messageGo to next message
Cailin Nelson is currently offline Cailin NelsonFriend
Messages: 5
Registered: September 2009
Junior Member
Sorry, I also should have mentioned the following :

1. This is eGit on Windows Vista with either Eclipse 3.4 and Eclipse 3.5

2. The directory structure is as follows

EclipseWorkRoot
/git-demo
.git
README.txt
/demo
README.txt


I can't add either of the README.txt or the /demo folder to source control.

The internals of my .git directory look healthy, showing all the usual
sub-directories.
Re: Using EGit - basics [message #573941 is a reply to message #481587] Fri, 21 August 2009 21:34 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Cailin Nelson wrote:

> I also see this same behavior.
>
> When I try to do Team -> Add to Version Control on any file, I get a popup
> error window that is empty. The title of the error window is "Track
> fail".
>
> No corresponding error message appears in the Eclipse error log (at
> metadata/.plugins/org.eclipse.ui.workbench/log).
>
> I see this same behavior on both Eclipse 3.4 and Eclipse 3.5.

I see logging goes to stdout... (very old code). Could you try starting
eclipse with a cmd windows, i.e. eclipsec.exe and see what its says?

-- robin
Re: Using EGit - basics [message #574059 is a reply to message #481617] Mon, 31 August 2009 21:04 Go to previous messageGo to next message
Cailin Nelson is currently offline Cailin NelsonFriend
Messages: 5
Registered: September 2009
Junior Member
Sorry for the delayed reply (vacation). I've followed your instructions
and run eclipsec.exe on the command line. I see the following :

2009-08-31 10:38:12.144::INFO: jetty-6.1.11
2009-08-31 10:38:12.146::INFO: Started SocketConnector@127.0.0.1:8501
2009-08-31 10:38:12.153::INFO: Started SocketConnector@127.0.0.1:8601
org.spearce.jgit.errors.ObjectWritingException: Unable to create new
object: M:\
WorkRoot\git-demo\.git\objects\e6\9de29bb2d1d6434b8b29ae775a d8c2e48c5391
at
org.spearce.jgit.lib.ObjectWriter.writeObject(ObjectWriter.j ava:397)
at
org.spearce.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:128)
at
org.spearce.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:110)
at org.spearce.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:385)
at org.spearce.jgit.lib.GitIndex.add(GitIndex.java:167)
at
org.eclipse.egit.core.op.TrackOperation.run(TrackOperation.j ava:117)
at org.eclipse.egit.ui.internal.actions.Track$1.run(Track.java: 41)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(Modal
Context.java:121)
Re: Using EGit - basics [message #574090 is a reply to message #483284] Tue, 01 September 2009 06:45 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Cailin Nelson wrote:

> Sorry for the delayed reply (vacation). I've followed your instructions
> and run eclipsec.exe on the command line. I see the following :
>
> 2009-08-31 10:38:12.144::INFO: jetty-6.1.11
> 2009-08-31 10:38:12.146::INFO: Started SocketConnector@127.0.0.1:8501
> 2009-08-31 10:38:12.153::INFO: Started SocketConnector@127.0.0.1:8601
> org.spearce.jgit.errors.ObjectWritingException: Unable to create new
> object: M:\
> WorkRoot\git-demo\.git\objects\e6\9de29bb2d1d6434b8b29ae775a d8c2e48c5391
> at
> org.spearce.jgit.lib.ObjectWriter.writeObject(ObjectWriter.j ava:397)
> at
> org.spearce.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:128)
> at
> org.spearce.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:110)
> at org.spearce.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:385)
> at org.spearce.jgit.lib.GitIndex.add(GitIndex.java:167)
> at
> org.eclipse.egit.core.op.TrackOperation.run(TrackOperation.j ava:117)
> at org.eclipse.egit.ui.internal.actions.Track$1.run(Track.java: 41)
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(Modal
> Context.java:121)

What paths exists below M:}\WorkRoot\git-demo? Maybe the repo creation
failed. Obviously we need better error handling here.

Can you create that path manually? Delete it afterwards. I guess M: here is
a network drive of some sort.

-- robin
Re: Using EGit - basics [message #574163 is a reply to message #483461] Thu, 10 September 2009 03:55 Go to previous messageGo to next message
Cailin Nelson is currently offline Cailin NelsonFriend
Messages: 5
Registered: September 2009
Junior Member
The .git directory is already there and seems to be in working order.

However - your comment about M: being a network drive gave me an idea.

M: is actually a Samba share to my Linux box. I've been running in this config (Eclipse on Windows, writing to Linux directories via Samba) for years without any trouble - using both the CVS and SVN Eclipse functionality.

But - there seems to be something that the EGit plugin doesn't like about the Samba share! My problems went away when I tested on a straight up Windows directory on my C: drive.

Anyway, thanks for the help, and I'll try and puzzle out what ridiculous Samba config needs tweaking on my own.
Re: Using EGit - basics [message #576258 is a reply to message #574163] Mon, 30 November 2009 14:32 Go to previous messageGo to next message
Frank  is currently offline Frank Friend
Messages: 2
Registered: November 2009
Junior Member
I have exactly the same problem.. egit works allright locally on C: but if my project is at a networked drive either using a mapped path like S: or using \\server\share I get an empty popup error message.

Using Zend studio 7.0.2 (eclipse platform 3.5.0 I believe) and

Egit 0.6.0.200911171911
Re: Using EGit - basics [message #576816 is a reply to message #576258] Thu, 07 January 2010 15:00 Go to previous messageGo to next message
Chris K is currently offline Chris KFriend
Messages: 2
Registered: January 2010
Junior Member
I have the exact same problem

EGit 0.6.0.200912061443
JGit 0.5.0.200912061441
Eclipse 3.5 Build 20090920-1017

This worked splendidly under 3.4, and it fails on my local drives, E: and C:

It fails to recognize that the project has been added to a repository.
Re: Using EGit - basics [message #576848 is a reply to message #8609] Thu, 21 January 2010 14:38 Go to previous messageGo to next message
Robert de Wilde is currently offline Robert de WildeFriend
Messages: 6
Registered: January 2010
Junior Member
I have the same problems using Eclipse with EGit on Windows XP. Very annoying, but ok. If additional information is required, just ask.

Same situation, got a samba share. Gives some additional clues when trying to commit:

Error during commit
Reason:
Committing changes
Unable to create new object Z:\my\path\project\.git\object\44\8496808a58e224....
Re: Using EGit - basics [message #577033 is a reply to message #8609] Fri, 29 January 2010 21:36 Go to previous messageGo to next message
Robert de Wilde is currently offline Robert de WildeFriend
Messages: 6
Registered: January 2010
Junior Member
Check for possible solution:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=301213
Re: Using EGit - basics [message #577135 is a reply to message #8609] Mon, 01 February 2010 15:20 Go to previous message
Jimbolino  is currently offline Jimbolino Friend
Messages: 2
Registered: February 2010
Junior Member
Hi,

I too have the same problem.

EGit: 0.6.0.201001232236

The problem appears when i chose "Add to Version Control"

An error box "Track failed", without further text appears.

Eclipsec.exe output:
org.eclipse.jgit.errors.ObjectWritingException: Unable to create new object: Z:\www\test\.git\objects\f6\d7651e2766bcf93301b09bd3fb5de06a 8f8ec9
at org.eclipse.jgit.lib.ObjectWriter.writeObject(ObjectWriter.j ava:398)
at org.eclipse.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:125)
at org.eclipse.jgit.lib.ObjectWriter.writeBlob(ObjectWriter.jav a:107)
at org.eclipse.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:385)
at org.eclipse.jgit.lib.GitIndex.add(GitIndex.java:167)
at org.eclipse.egit.core.op.TrackOperation.run(TrackOperation.j ava:117)
at org.eclipse.egit.ui.internal.actions.Track$1.run(Track.java: 41)
at org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)

I've tried the changes to the samba config, but they don't seem to work.
Previous Topic:Importing projects
Next Topic:Change eclipse brand image from welcome page
Goto Forum:
  


Current Time: Thu Apr 18 01:22:19 GMT 2024

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

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

Back to the top