Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » home directory wrong in jgit 0.8.4 using fetch
home directory wrong in jgit 0.8.4 using fetch [message #629602] Tue, 28 September 2010 20:35 Go to next message
Steve Maring is currently offline Steve MaringFriend
Messages: 10
Registered: September 2010
Junior Member
I downloaded org.eclipse.jgit.pgm-0.8.4.sh and copied it to /usr/local/bin/jgit in my cygwin installation.

I am trying to use org.eclipse.jgit.pgm.Main directly from the maven exec plugin and am using the sh script to debug the commands.

I can clone my project without a problem with either git or jgit. However, only git seems to work when I try a fetch.

$ git fetch origin
Enter passphrase for key '/home/ssmaring/.ssh/id_rsa':


$ jgit fetch origin
fatal: java.io.FileNotFoundException: C:\cygwin\home\ssmaring\home\ssmaring\.ssh\id_rsa (The system cannot find the path specified)
fatal: git@github.com:smaring/yui-war-overlays.git: java.io.FileNotFoundException: C:\cygwin\home\ssmaring\home\ssmaring\.ssh\id_rsa (The system cannot find the path specified)


Why does jgit think that my home directory is "c:\cygwin\home\ssmaring\home\ssmaring"?

Is there a way to override this?

Thanks,
Steve Maring
Re: home directory wrong in jgit 0.8.4 using fetch [message #629740 is a reply to message #629602] Wed, 29 September 2010 12:43 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
jgit autodetects the cygwin environment by checking if it can find cygpath.exe under some of the directories defined in the Java system property java.library.path [1]. This is necessary to do proper path translations in the cygwin environment [2].

It obtains the user home from the environment variable HOME which is set by the cygwin environment. If you want to point to a different directory you need to set this environment variable in cygwin to this other directory and then start jgit from this environment.

[1] FS_Win32_Cygwin.java
[2] http://www.cygwin.com/cygwin-ug-net/using-utils.html, section cygpath
Previous Topic:Conflict resolution graphical editor (like subclipse)
Next Topic:Where is git+ssh protocol?
Goto Forum:
  


Current Time: Tue Apr 16 07:34:32 GMT 2024

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

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

Back to the top