It didn't matter what I tried I couldn't get the HTTPS URL provided by xp-dev.com to work, which leaves us with SSH. I won't bother with all the other things I tried, but these steps finally worked.
Prerequisites
GIT (and the GIT Bash)Eclipse
EGIT
An XP-Dev account
Steps
- Open Git Bash.
- Type ssh-keygen and press enter to all the questions. Make a note of where the file is saved.
- Open the file and copy the pass key but not the other stuff to your clipboard. That means everything in-between the "ssh-rsa" and your "username@computer".
- The folder path that the file is dumped to is the same file path that's in Eclipse's Preferences, General -> Network Settings -> SSH2 [SSH2 Home].
- Go to XP-Dev.com, select Dashboard, then "account" at the top right.
- Select "View Profile In Detail".
- Under "Add a New Public Key" give the key a name (doesn't matter what), then paste the key and save it. Any error messages means you copied the wrong part of the key (see step 3).
- Go back to your Git Bash.
- Type ssh
@xp-dev.com. It should tell you "all shell logins disabled". That's fine because it means we at least got authenticated. - Go to the project in Eclipse you want hosted at XP-Dev.com.
- Make sure that this project is in it's own local GIT repository. If it isn't already, then follow the EGIT Getting Started Guide.
- Select Team->Remote->Push...
- Enter the URL which should be something like: ssh://
@git.xp-dev.com/ . Enter your password and select Next. - Enter the other details that you want to push - I just selected [master - branch] under Source Ref, and then "Add Spec" and Finish.
- Hope it all works!
One Other Thing Of Note
- I added the file generated in step 3 to the list of private key settings in Eclipse's Preferences, General -> Network Settings -> SSH2, but I don't believe I should have or it makes a difference. However, I'm not taking it out now it works.
Is using Github.com too easy? ;)
ReplyDelete