Using EGit to Push Local Eclipse Repositories to Github

EGit is an Eclipse Team provider for the Git version control system. Using EGit a developer can push a local Eclipse repository to GitHub.

First create a new repository at GitHub:

Egit-0.6-001-CreateRepoAtGithub.png

Your new repository will have a clone URL:

Egit-0.6-002-CloneUrl.png

In Eclipse, open “Window” > “Preferences”:

-make sure that your SSH2 home is configured correctly

-make sure that your SSH2 home contains your SSH2 keys

-make sure that you have saved your public key to your GitHub account settings

If you have not yet generated a SSH key, click the “Key Management” tab to generate a new public key.

-Remember to save this new key to your GitHub account.

Egit-0.6-003-SshPreferences.png

 

Select your Eclipse project and click “Team” > “Push To”

-Enter your GitHub clone URL

-Enter your GitHub password

-Enter “git” as the user

-Click “Next”

Egit-0.6-004-PushDialog.png

Accept the connection:

Egit-0.6-005-AcceptHostKey.png

Enter the password associated with the SSH key:

Egit-0.6-006-PassPhrase.png

Enter “refs/heads/master” as source ref and destination ref

Click “Add all branches spec”

Egit-0.6-007-PushRefSpecifications.png

Click “Next” and then “Finish” to confirm the push:

Egit-0.6-008-PushConfirmation.png

Click O.K:

Egit-0.6-009-PushResult.png

Your GitHub repository has been updated:

Egit-0.6-010-PushResultOnGithub.png