Getting started with Git, Github and Eclipse on Windows
Having got github and eclipse talking to each other in OS X and Ubuntu I thought that doing the same in windows would be pretty straight forward. Unfortunately, I quickly ran into the mess that is ssh handling on windows. In the future I’ll post about getting git to work from cygwin and from the dos prompt, today I’m going to concentrate on getting eclipse to handle everything. This won’t get you the great command line but it will get you started. So let’s get started.
Install git eclipse plugin
The eclipse integration relies on the egit plugin. To read more about the project visit http://www.jgit.org/.
To install the plugin add the update site
http://www.jgit.org/update-site
Once you’ve added the update site open it and you’ll see that there are several builds available. I’ve been using the Release Build which seems to work well although the best option is likely to change. Check the box for the Release Build and hit install and follow the wizard.
Get started with github
ssh setup
Eclipse has it’s own setup for ssh key management.
Open up the ssh management in Preferences => General/Network Connections/SSH2.
Open the “Key Management” tab.
Click “Generate DSA key…”. This will generate your ssh key which is now shown to you in the ssh2 tab
Click “Save Private Key…”
Click “OK” to ignore the warning about saving without passphrase protection
Click “Save” with the default location to store the keys in your ssh directory
You now have ssh keys setup for use with eclipse
Copy the key into your clipboard from where it is displayed on the ssh2 tab, you’ll need this for the github signup.
Create account
Go to http://github.com/plans and signup to whichever plan you want. On the signup screen there is an area to add your ssh key. You should have this in your clipboard buffer from the previous step. You can now paste it into the github signup form.
Once you’ve finished the signup screen you’ll be logged in and taken to your github home.
Create repository
On the github home screen, next to “Your Repositories” click “create a new one”
Once you’ve filled the form out hit “Create Repository” and you’ll be taken to a page with some initial instructions. Follow these and you will end up with a local repository that is pointing to github as the origin.
You’re now setup with a github account and your first repository. So all that’s left is the eclipse setup.
Checkout from github
The egit plugin assumes that you haven’t checked out the project yet so if earlier you checked out your new repository into your workspace folder you need to delete it so that egit can check it out itself and manage it. If anyone has found a better way of doing this please let me know.
From the “File” menu select “Import”
Select Git/Git Repository
You now need the git address for the repository you created in github.
To get this visit http://github.com
Click on your repository under “Your Repositories”
Copy Your Clone URL:
Back in eclipse paste into the import wizard
Change protocol to git+ssh
Hit next three times and eclipse download your repository
You’ll then arrive at the Import Projects screen. At this stage your project has already been checked out onto the filesystem at path/to/workspace/project_name.
If you repository is currently empty then the list of projects will be blank
Egit will only checkout projects that have been previously been set up in eclipse
To remedy this we need to manually add a .project file to the root of your project
Using your favourite text editor create a file at path/to/workspace/project_name/.project
Paste in the following - changing the name to the name of your project
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>test</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
Once you’ve saved this return to eclipse and in the import wizard hit back and then next. When the projects screen is shown you should now see your project listed.
Hit finish and you should now see your project checked out in your workspace
OK, you’re now ready to start using your git repository from inside eclipse. For now there’s no command line git setup, my next two posts will be about getting git setup with cygwin and with the dos prompt.

26. June 2009 at 05:04
Oliver,
You saved my day!
With the post from “PEZ” alone, I couldn’t properly set it up on Windows due to authentication issues, but yours solved it perfectly.
I do greally appreciate your post and will make a similar comment on GitHub blog as well.
Regards,
Joseph
29. June 2009 at 19:16
Hi Joseph, I’m glad it helped, I had to endure quite a bit of pain myself when I was originally trying to set this up on windows.
2. December 2009 at 06:03
Another solution taked from: http://blog.msbbc.co.uk/2009/11/get-eclipse-egit-and-github-all-working.html
“Right click on the Project Explorer, New > General > Project, give it the same name as your repository. It should “create” your project in the Project Explorer.”
31. March 2010 at 16:15
adipex d no perscription or canada adipex diet pills or buy brand name adipex without prescription or adipex p how it works or adipex fedex
8. April 2010 at 12:05
tramadol no prescription fed ex or bella donna diet pills or how to wean off zoloft or lorazepam how long take effect or safety of acai berry