Configuring the EGit Plugin for EclipseEGit is an Eclipse Team provider for the Git version control system. Git is a distributed SCM, which means every developer has a full copy of all history of every revision of the code, making queries against the history very fast and versatile. The EGit project is implementing Eclipse tooling on top of the JGit Java implementation of Git.
- Install Eclipse
- Install Git
- Set up an account on GitHub, set up a local repo, and connect successfully via Bash
Installing the EGit plugin from within EclipseFrom the Eclipse menu bar click Help > Install New Software. The following window (Figure 1-1) should pop up. You don't need to add an update site URL since Eclipse will find it automatically.
- In the "Work with" drop down select "--All Available Sites--"
- In the field that reads "type filter text" type: Git
- The area below should automatically populate after a few seconds with a few options for the EGit plugin listed. Check the option as listed in Figure 1-2 (Collaboration > Eclipse EGit (Incubation))
- Click "Next"
- Click Finish
Share your projectNow you need to get your files into the repository which means configuring the connection to GitHub from Eclipse. I've heard this part is not supposed to require anything special but I ran into a couple quirks. Fortunately I found some great resources online to help. They are listed at the end of this post.
- Right click your project and click Team > Share Project...
- In the window that pops up select Git and click "Next"
- If you have already set up a local git repo (i.e., you've run "git init") then you should see your project listed in this window
- Make sure the box next to your project repo is checked and click "Finish"
- In the Eclipse menu bar click Window > Preferences
- Navigate to General > Network Connections > SSH2
- Click the General tab (it should be selected by default) & make sure your "SSH2 home" path is correct. Mine was set to "C:\Users\Dennis\ssh" and it needed to be set to "C:\Users\Dennis\.ssh" (whoops)
- Next click the Key Management tab, then click the "Load Existing Key" button
- In the window that pops up navigate to your .ssh directory and select the id_rsa file and click "Open".
- Click "OK"
In closingHopefully this has provided you with some helpful info. If you've got any questions please drop them in the comments below. They're more likely to get answered there either by me or someone else as this is a fairly highly trafficked blog.
Thanks for reading!
First is first:
rpm -Uvh epel-release-5-4.noarch.rpm
yum install git
Next steps, configure git configuraiton:
git config --global user.name "Basil Abbas"
git config --global user.email "email@example.com"
git config --global color.ui auto
Creating a bare repository on a remote server:
git init --bare
Cloning the bare remote repository on a development machine:
git clone ssh://hostname/path/to/project_directory