Daniel 'MaTachi' Jonsson

Tag Archives: Github

How to Set Up Egit with Github in Eclipse

When I the other day tried to set up Egit in Eclipse Indigo with Github I had major problems with guides not working. Two of the tutorials I tried where:

I got many errors and such… :/

But I found a really good post describing how to set it up in a current version of Eclipse:

2. In eclipse, configure the remote push
a. Window > Show View > Git > Git Repositories will add a repository explorer window.
b. In the repository window, select the repository and expand and right-click Remotes and choose Create Remote.
c. Copy the github repository URI from the github repository page and paste this in the URI box.
d. Select ssh as the protocol but then go back to the URI box and add “git+” at the beginning so it looks like this: git+ssh://git@github.com/UserName/ProjectName.git
e. In the Repository Path box, remove the leading slash
f. Hit next and cross your fingers. If your get “auth fail” restart eclipse and try step 5 again.
g. When you get past the authentication, in the next dialog select “master” for source ref, click “Add all branches spec” and “Finish”.

Now try a push to github. This worked for me but with all the fiddling around I’m not sure these instructions are perfect….

Link to the post: http://www.eclipse.org/forums/index.php/mv/msg/200890/648905/#msg_648905