Work with GIT on remote site instead of local - eclipse

I have to work on a project that is on a remote GIT repository. I have a development environment accessible via ssh: I would use git on it, but I like Eclipse EGit package so I would know if there's a way to connect my Eclipse with the remote cloned repository.

Depending on the network, you might be able to mount the remote filesystem locally and use Eclipse to access the code. This will not be great on slow network.
Alternatively you can tar up the source and just copy it locally, then periodically copy to the server.
If you say that you have the development environment accessible via ssh then how will eclipse help you if it isn't in a development environment? Wouldn't you need to recreate your development environment locally as well?
You can install a remote desktop solution like NoMachine and run eclipse on the remote machine.
Please provide more details.

Related

How to clone mercurial repository created by eclipse plugin in other laptop?

My colleague created mercurial repository by eclispe plugin(http://javaforge.com/project/HGE)(right click project root->team->share with->mercurial....) in hist laptop with ip address:192.168.0.111,the question is how I can clone his repository use same plugin in eclipse.
For cloning, you need access via either ssh or http (or some other mechanism provided by a plugin). If your colleague is running a Linux or OS X system, he could run an SSH server on his box and create an account for you, so that you'd be able to clone his repository over ssh. The easier solution, which also works on Windows, is for your colleague to run hg serve in his Mercurial repository (I don't know if the Eclipse plugin has an option for that), which will run the embedded webserver. By default, you should then be able to clone from http://192.168.0.111:8000/ (the hg serve command has options to run it on another port).

Setup a development environment git + centos + Eclipse egit on windows

I am setting up a development environment in my home. I have installed a centos linux in a virtual machine. All files in /var/www/html are shared with samba.
I have access to these files in windows. I have installed git in centos. I created a git repository in a sub directory of /var/www/html.
I am using Eclipse in windows. Egit is installed in Eclipse. I tried to add repository in eclipse but when I do a commit in egit, "git status" in linux displays a list of modified files to commit. Also when I do a commit in linux, all files in egit will be marked az modified.
I don't know how to synchronize egit with git. What is the correct way to do this?
The easiest solution by far would be to use a cloud service such as GitHub (or BitBucket if you want free private repositories).
An example workflow is (on terminal, however your clients will have GUI options for this):
$ git remote add origin git#bitbucket.org:username/repository
$ git push origin master
The on your other client fetch the changes and merge them in through pull
$ git pull
Both sides will need to have the same remote repository - This way you can push - pull wherever you do the work and the code be the same. I use this setup for developing and deploying my web-apps.
This solution relies on you having an internet connection - if you dont want or dont have an internet connection at your disposal then have a look at this post:
gitosis vs gitolite?

Use eclipse as subversion local copy GUI?

I have a working local copy of a remote svn server. I access this server via ssh with ProxyCommand in my .ssh/config file since it isn't directly reachable.
What I would like to do is using eclipse to browse my local copy of svn, make changes and commit them instead of using the command line. It would be like using eclipse as a gui for this svn local copy.
Is this possible without creating yet another local copy of my repo. ? If so, could you tell me which steps I should make because I am a bit lost here...
I am running an ubuntu 12.10 bow, with eclipse 3.8. I have installed subversive and svnKit connector.

Using Git With Eclipse Remote Systems Explorer

I am doing web development using CFEclipse with Classic Eclipse (Indigo) on a Windows Server.
I am using Remote Systems Explorer to access a Linux box via sftp.
The Linux box has Git installed. There is one branch in the development folder.
I have installed EGit in Eclipse, but there are no provisions for working with a remote system.
Because I cannot develop locally, how should I checkout files, edit and review changes in a browser, and ultimately commit properly? There is no local repository and checking out files through ssh (putty) while editing them in Eclipse does not show my changes when browsed.
If you can access to the remote location through ssh why you don't just simply clone the repository in local and then pull and push the changes ?
I think that cloning the the repository is the best bet in your situation, you have only to install msysgit on your windows machine ...
You can use remote project to achieve what you need. Unfortunately, git operations need to be done on the remote server. But, you can change the files and the files will be changed remotely on fly. To create the remote project you have to right click on the remote folder you want to create the remote project. The context menu you will find "Create Remote Project".
What Eclipse will do is make the modification thru RSE. This means, eclipse will deal with save files remotely.

Debugging an eclipse / maven project on a remote server?

I use my laptop for development but its resources are limited. I have a local eclipse / maven and my local codebase and I want to keep that because I want to be able to program, compile and junit-test all time.
At my office, I'd like to be able to debug in a production-like scenario, that means, with a big database and and a 8GB RAM java heap.
I thought It shouldn't be too difficult to set up eclipse and maven to put the compiled code on a remote machine, execute a maven process (jetty:run on the remote machine) and attach eclipse for debugging. The remote machine can have its own database and I only have to make sure that the maven repositories are in sync.
Did anyone manage to run this or a similar scenario? I still could not figure out how to put the compiled sources of my ~10 projects on a remote machine. I think running a maven task and attaching a debugger should be easy with some ssh-magic.
No ssh-magic should really be required unless firewalls are a problem. Just get your project onto the remote somehow, and then run your build with mvnDebug instead of mvn. Maven will listen for a debug connection on port 8000 by default and will wait until you've connected to proceed with the build. Configure a remote debugging launcher in Eclipse, and it will connect and debug like normal. As for getting the code across, you could use rsync, but this is an excellent use case for git. That's how I do this exact thing myself.
Edit: I've never looked for a way to do this with Eclipse, but you can run any arbitrary command from Eclipse, so rsync should work fine. With rsync, you'd want something like
rsync -ruz . <user>#<host>:/<path>
Run that from your project directory, and it should copy the full content of the directory to on the remote host, only copying updated files after the initial copy. You can exclude directories, like target, with the repeatable --exclude option. E.g. --exclude=target. After copying the project, you could start a build with
ssh <user>#<host> mvnDebug <whatever>
The git way might seem a little more arcane if you aren't acquainted with git, but it has the additional benefit of being able to easily make fixes on the remote and pull them back to local. With git, you'd first log in to the remote with ssh, create a project directory, and git init it. AFter that, you can push changes to the remote at any time with
git push -f <user>#<host>:/<path> master
assuming you're working in master, and then on the remote:
git reset --hard
mvnDebug <whatever>