Use Planios Git repositories with Eclipse » History » Sprint/Milestone 2
Jan Schulz-Hofen, 03/13/2014 04:06 AM
1 | 1 | Jan Schulz-Hofen | # Using Planio's Git repositories with Eclipse |
---|---|---|---|
2 | |||
3 | This guide explains how to set up Eclipse to use Planio's Git repositories using EGit. Both Eclipse and EGit are free and can be downloaded from [eclipse.org](http://eclipse.org/). |
||
4 | |||
5 | {{>toc}} |
||
6 | |||
7 | ## Set up a key pair using Eclipse and store your public key in Planio |
||
8 | |||
9 | - Select "Window" -\> "Preferences" from the Eclipse application menu. |
||
10 | - Navigate to "General" -\> "Network Connections" -\> "SSH2". |
||
11 | - Select the "Key Management" Tab. |
||
12 | ![](generate_key.png) |
||
13 | - Click "Generate DSA Key...". |
||
14 | - Click "Save Private Key..." and store it as "id_dsa" in the ".ssh" directory within your home folder. |
||
15 | ![](key_saved.png) |
||
16 | - Copy the public key (displayed in the text area) into your clipboard. |
||
17 | - Open Planio in your browser, navigate to "My account" -\> "Public keys" and click on "New value". |
||
18 | ![](store_key_in_planio.png) |
||
19 | - Enter a title for your key. It makes sense to have one key per computer you use, so a good name would be e.g. "Work Laptop". |
||
20 | - Paste the key you copied to the clipboard in the "Key" field and click on "Create". |
||
21 | |||
22 | ## Install EGit |
||
23 | |||
24 | - Select "Help" -\> "Install New Software...". |
||
25 | ![](install_egit.png) |
||
26 | - Select "All Available Sites" from the drop down next to "Work with". |
||
27 | - Type "egit" in the search field. |
||
28 | - Check the box next to "Eclipse EGit (Incubation)" and click on "Next \>", accept the terms and click on "Finish" to install EGit. |
||
29 | |||
30 | ## Make your first commit |
||
31 | |||
32 | - Open a context menu for your project, select "Team" -\> "Share Project...", then select "Git" and click "Next \>". |
||
33 | ![](share_project.png) |
||
34 | - Select your project and click on "Create Repository" to create a local Git repository, then click "Finish". |
||
35 | - Open a context menu for your project, select "Team" -\> "Add" to add your local changes to the cache. |
||
36 | - Open a context menu for your project, select "Team" -\> "Commit" to commit your local changes to the (local) repository. |
||
37 | ![](commit.png) |
||
38 | - Enter a commit message and perform your first commit. If being asked for your name and email address, please enter the information as needed. |
||
39 | ![](identify.png) |
||
40 | - Open a context menu for your project, select "Team" -\> "Remote" -\> "Push..." and enter your Planio repository URI in the URI field. You can find your Planio repository URI in your Planio account by navigating to the "Repository" tab. |
||
41 | ![](repo_details.png) |
||
42 | - Then, click on "Next \>" and select "master \[branch\]" as a source ref and confirm "refs/heads/master" as a destination ref. |
||
43 | ![](push.png) |
||
44 | - Finally, click on "Add spec", then on Finish. |
||
45 | - If being asked for a password for secure local storage, select a password and click OK. This password is used to encrypt Eclipse data locally, you should not use your Planio password here. |
||
46 | - Your project should have been pushed to Planio's remote Git repository. |