Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Working with git clone but on remote server(Desktop connects via ssh to remote server with git clones - Using these git clones for development)
Working with git clone but on remote server [message #1459037] Sun, 02 November 2014 02:51 Go to next message
Atul Kakrana is currently offline Atul KakranaFriend
Messages: 5
Registered: November 2014
Junior Member
Hi All,

I am having problem using git and need help from you guys. We have multiple servers which obviously are interconnected. On our central server lies main git, to work with these gits we clone them on one of the other (more powerful) server (Server-A) and work with the scripts i.e. develop and test; and finally push to central server. The reason we always work on servers and never local desktops is because scripts mostly involve processing large data sets and uses parallel processing so huge memory and decent amount of cores is required while developing the scripts.

In past, I used to mount onto my Linux desktop/laptop, the HOME directory of server and open the files directly, modify and save them. But after git this doesn't seems to be a good option due to multiple branches that we can make and work on one by one. So there is no single file, in fact, if I am correct there is no physical file for every branch.

As, I have used Eclipse in past to access to work on files that lie on remote server I thought I could do the same with gits i.e. add git from remote server or mounted HOME directory. But I think I was wrong, EGIT has no option to add remote git and I believe it can only work with remote gits. Here is my scenario:

Desktop/Laptop ----SSH-----> Server A (Powerful server with git clones) <---------PUSH/PULL-------> Central Server (main gits)

The scripts or packages that I work on can only be developed on Server A and not on my desktop. Is there a way I can add cloned-git from server A to my local desktop eclipse so that I can develop and test real time and switch branches?

From last few days, I am trying to find a solution for this and would appreciate your help.


Best

BADE
Re: Working with git clone but on remote server [message #1460302 is a reply to message #1459037] Mon, 03 November 2014 12:17 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 264
Registered: July 2009
Senior Member
Imagine you can mount //serverA/home to /mnt/serverAHome on your Laptop. Then you can start Eclipse on your Laptop and clone the central repo to your personal clone of the repo located on serverA. E.g. on your laptop you clone http://centralServer/yourRepo.git to /mnt/serverAHome/<yourID>/git/yourRepo. Now you can access all the files with Eclipse from your laptop. You develop, create branches, switch branches, create commits and finally push them back to http://centralServer/yourRepo.git.
Your colleagues do the same with their personal clones of the central repo. You exchange work by pushing/fetching through the central server. Any problems with that procedure?


Ciao
Chris
Re: Working with git clone but on remote server [message #1460491 is a reply to message #1460302] Mon, 03 November 2014 16:16 Go to previous messageGo to next message
Atul Kakrana is currently offline Atul KakranaFriend
Messages: 5
Registered: November 2014
Junior Member
Hi Chris,

Quote:
Imagine you can mount //serverA/home to /mnt/serverAHome on your Laptop


I mount using the Ubuntu's inbuilt functionality to "connect to server" which adds the /serverA/home to my network drives with local mount point at /run/user/1000/gvfs

Quote:
Then you can start Eclipse on your Laptop and clone the central repo to your personal clone of the repo located on serverA. E.g. on your laptop you clone //centralServer/yourRepo.git to /mnt/serverAHome/<yourID>/git/yourRepo. Now you can access all the files with Eclipse from your laptop.


I already have cloned the repository to server-A using terminal via ssh. Using the git perspective in eclipse, when I try to add these repositories by navigating to the local mount point of server-A and then to git folder, I can see two repositories found by eclipse but these are not added after I press 'finish' button. [Photo Attached- Adding_Git_mod]

I followed your advise too, to clone the repositories using Eclipse. For this, I mounted another server (Server-X) to my Ubuntu desktop and then used "Clone Git repository" steps to clone one of the repo. from our central server. It did added a repository to the Server-X and I can confirm because I can see the files in nautilus/window explorer but again no git added to eclipse under "git repositories". [Photo Attached - Empty_Git]

So it seems that Eclipse is identifying as well as cloning the gits properly to the servers (A and X) mounted on my desktop. Its just that these are not added or listed in Eclipse. Any suggestions?

I really appreciate your help.

[Updated on: Mon, 03 November 2014 16:19]

Report message to a moderator

Re: Working with git clone but on remote server [message #1460747 is a reply to message #1460491] Mon, 03 November 2014 22:32 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 264
Registered: July 2009
Senior Member
May it is because when you are using the gvfs feature then the pathes contain special characters like = and : . Maybe this disturbs EGit. Can't you mount more traditionally that you have a more standard path?
Youre screenshot Adding_Git_mod.png cuts off where it gets interesting. I am interested in the full path. Especially how these two pathes differ. Can you cut and paste the two urls here?


Ciao
Chris
Re: Working with git clone but on remote server [message #1460891 is a reply to message #1460747] Tue, 04 November 2014 02:22 Go to previous messageGo to next message
Atul Kakrana is currently offline Atul KakranaFriend
Messages: 5
Registered: November 2014
Junior Member
Hi Chris,

Quote:
Can't you mount more traditionally that you have a more standard path?


I might be able to but using the default method is very stable. In past I have faced problem with manually assigned mount points.

Quote:
Can you cut and paste the two urls here?


Attached the new photo. Pasting urls:

Directory Path
/run/user/1000/gvfs/sftp:host=abc.xxx.yyy.edu,user=obama/home/obama/git

GIT PATH
/run/user/1000/gvfs/sftp:host=abc.xxx.yyy.edu,user=obama/home/obama/git/SOME_PIPELINE/.git
/run/user/1000/gvfs/sftp:host=abc.xxx.yyy.edu,user=obama/home/obama/git/TOOLX/.git

Thanks

Bade



[Updated on: Tue, 04 November 2014 02:24]

Report message to a moderator

Re: Working with git clone but on remote server [message #1461068 is a reply to message #1460891] Tue, 04 November 2014 07:00 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 264
Registered: July 2009
Senior Member
then please try out to mount statically to see whether the strange file system pathes cause a problem in EGit. Please also attach that part of eclipses error log covering the time where you try it (make sure it doesn't contain user/pwd before you paste)

Ciao
Chris
Re: Working with git clone but on remote server [message #1462945 is a reply to message #1461068] Thu, 06 November 2014 04:09 Go to previous messageGo to next message
Atul Kakrana is currently offline Atul KakranaFriend
Messages: 5
Registered: November 2014
Junior Member
HI Chris

Quote:
then please try out to mount statically to see whether the strange file system pathes cause a problem in EGit.


Thanks I am being able to add my git repos. Now the problem is that when I right click on the script to open, eclipse grey's out and menu to open doesn't shows up.

Here are last few error-log messages:

Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String

java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
	at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
	at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
	at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
	at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
	at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)


Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.

An exception stack trace is not available.



Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String

java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
	at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
	at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
	at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
	at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
	at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)


Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.

An exception stack trace is not available


Thanks for helping

Atul
Re: Working with git clone but on remote server [message #1463374 is a reply to message #1462945] Thu, 06 November 2014 14:03 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1072
Registered: July 2009
Senior Member
The ClassCastException is not related to EGit but coming from m2e (Eclipse Maven integration).
The Warning about gitPrefix shouldn't cause big trouble, you can set the gitPrefix manually in
Preferences "Team > Git > Configuration > Tab System Settings" you can change the location of
system level git configuration.
Previous Topic:Error validating settings: Not Found
Next Topic:SOLVED: Eclipse keeps asking for passphrase (even when entered)
Goto Forum:
  


Current Time: Sat Aug 24 00:54:55 GMT 2019

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

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

Back to the top