Update EGit eclipse help from wiki
[egit.git] / org.eclipse.egit.doc / help / EGit / User_Guide / Working-with-remote-Repositories.html
blob9c726125a1656dd6ebdb71052e214b86e8ae9594
1 <?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5 <title>EGit User Guide - Working with remote Repositories</title>
6 <link type="text/css" rel="stylesheet" href="../../book.css"/>
7 </head>
8 <body>
9 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
10 <tr>
11 <th style="width: 100%" align="center" colspan="3">Working with remote Repositories</th>
12 </tr>
13 <tr>
14 <td style="width: 20%" align="left">
15 <a href="Starting-from-existing-Git-Repositories.html" title="Starting from existing Git Repositories">
16 <img alt="Previous" border="0" src="../../images/prev.gif"/>
17 </a>
18 </td>
19 <td style="width: 60%" align="center"></td>
20 <td style="width: 20%" align="right">
21 <a href="Inspecting-the-state-of-the-Repository.html" title="Inspecting the state of the Repository">
22 <img alt="Next" border="0" src="../../images/next.gif"/>
23 </a>
24 </td>
25 </tr>
26 <tr>
27 <td style="width: 20%" align="left" valign="top">Starting from existing Git Repositories</td>
28 <td style="width: 60%" align="center"></td>
29 <td style="width: 20%" align="right" valign="top">Inspecting the state of the Repository</td>
30 </tr>
31 </table><hr/>
32 <h1 id="Working_with_remote_Repositories">Working with remote Repositories</h1>
33 <h2 id="Cloning_remote_Repositories">Cloning remote Repositories</h2>
34 <p>Using the Git clone wizard you may clone remote repositories using different transport protocols. </p>
35 <p>The wizard can be started from the "Import Projects from Git" wizard using </p>
36 <pre>Import... -&gt; Git -&gt; Projects from Git -&gt; Next -&gt; Clone...
37 </pre>
38 <p>or from the "Git Repositories View" (described elsewhere) using the "Clone a Git Repository" toolbar button. </p>
39 <h3 id="Repository_Selection">Repository Selection</h3>
40 <p>On the first page of the wizard enter the location of the remote repository: </p>
41 <p>
42 <img border="0" src="images/02-GitProtocol.png"/>
43 </p>
44 <ul>
45 <li>
46 <b>URI</b> - The complete URI of the remote repository or the path on the file system. This field is automatically synchronized with the other fields.
47 <br/>Note that you can use the "Local file..." button to browse for a local directory and that the URI field offers content assist by offering previously used values
48 </li>
49 <li>
50 <b>Host</b> - The name of the remote host or empty if cloning from the file system.
51 </li>
52 <li>
53 <b>Repository Path</b> - Path to the remote repository or on the file system.
54 </li>
55 <li>
56 <b>Protocol</b> - One of the protocols described below.
57 </li>
58 <li>
59 <b>Port</b> - Port number.
60 </li>
61 <li>
62 <b>User</b> - The user name used for authentication.
63 </li>
64 <li>
65 <b>Password</b> The password used for authentication.
66 </li>
67 </ul>
68 <p>The following protocols are supported: </p>
69 <ul>
70 <li>
71 <b>git</b> - The most efficient built-in git protocol (default port 9418). This protocol doesn't provide authentication. Typically used for anonymous read access to the repository.
72 </li>
73 <li>
74 <b>git+ssh</b> - Git over
75 <a href="http://tools.ietf.org/html/rfc4251" target="egit_external">secure shell (SSH)</a> protocol. Typically used for authenticated write access to the repository.
76 </li>
77 <li>
78 <b>sftp</b> -
79 <a href="http://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol" target="egit_external">SSH File Transfer Protocol</a>
80 </li>
81 <li>
82 <b>http</b> -
83 <a href="http://tools.ietf.org/html/rfc2616" target="egit_external">Hypertext Transfer Protocol</a> can be tunneled through firewalls.
84 </li>
85 <li>
86 <b>https</b> -
87 <a href="http://tools.ietf.org/html/rfc2818" target="egit_external">Hypertext Transfer Protocol Secure</a> can be tunneled through firewalls.
88 </li>
89 <li>
90 <b>ftp</b> -
91 <a href="http://tools.ietf.org/html/rfc959" target="egit_external">File Transfer Protocol</a>
92 </li>
93 <li>
94 <b>file</b> - File system access to the repository.
95 </li>
96 </ul>
97 <h3 id="Branch_selection">Branch selection</h3>
98 <p>On the next page choose which branch should be cloned from the remote repository: </p>
99 <p>
100 <img border="0" src="images/05-branches.png"/>
101 </p>
102 <h3 id="Local_Destination">Local Destination</h3>
103 <p>On the next page define where you want to store the repository on the local file system and define some initial settings. </p>
105 <img border="0" src="images/06-LocalStorage.png"/>
106 </p>
107 <ul>
108 <li>
109 <b>Directory</b> - The directory which will contain the Git repository. It will be created by the wizard if it does not yet exist.
110 </li>
111 <li>
112 <b>Initial branch</b> - Choose here which local branch will be created and initially checked out.
113 </li>
114 <li>
115 <b>Remote name</b> - Define a name for the remote repository. The default is "origin".
116 </li>
117 </ul>
118 <h2 id="Pushing_to_other_Repositories">Pushing to other Repositories</h2>
119 <p>TBD</p>
120 <h3 id="Pushing_a_Local_Repository_to_GitHub">Pushing a Local Repository to GitHub</h3>
121 <h4 id="Create_Local_Repository">Create Local Repository</h4>
122 <ul>
123 <li>follow
124 <a href="http://wiki.eclipse.org/EGit/User_Guide/Getting_Started" title="EGit/User Guide/Getting Started" target="egit_external">EGit/User Guide/Getting Started</a> to create a new local repository (with your content instead of the demo project)
125 </li>
126 </ul>
127 <h4 id="Create_Repository_at_GitHub">Create Repository at GitHub</h4>
128 <ul>
129 <li>create a new repository at GitHub</li>
130 </ul>
132 <img border="0" src="images/Egit-0.6-001-CreateRepoAtGithub.png"/>
133 </p>
134 <ul>
135 <li>you get a fresh clone URL for this new repository</li>
136 </ul>
138 <img border="0" src="images/Egit-0.6-002-CloneUrl.png"/>
139 </p>
140 <h4 id="Eclipse_SSH_Configuration">Eclipse SSH Configuration</h4>
141 <ul>
142 <li>open "Window" &gt; "Preferences" and ensure that your SSH2 home is configured correctly (usually this is ~/.ssh) and contains your SSH2 keys (upload your public key to your GitHub account settings)</li>
143 </ul>
145 <img border="0" src="images/Egit-0.6-003-SshPreferences.png"/>
146 </p>
147 <ul>
148 <li>if you don't have SSH keys yet you may generate them on the second tab "Key Management" of this dialog, use a good pass phrase to protect your private key, for more details see
149 <a href="http://help.github.com/working-with-key-passphrases/" target="egit_external">"working with key passphrases"</a>
150 </li>
151 </ul>
152 <h4 id="Push_Upstream">Push Upstream</h4>
153 <ul>
154 <li>Select your new Eclipse project and click "Team" &gt; "Push To" and enter "Your GitHub Clone URL" and your GitHub password(with the free github accoutns do not enter a password but leave blank), leave the user as "git"</li>
155 </ul>
157 <img border="0" src="images/Egit-0.6-004-PushDialog.png"/>
158 </p>
159 <ul>
160 <li>click "Next" and on first connection accept GitHub's host key</li>
161 </ul>
163 <img border="0" src="images/Egit-0.6-005-AcceptHostKey.png"/>
164 </p>
165 <ul>
166 <li>enter your SSH key's passphrase</li>
167 </ul>
169 <img border="0" src="images/Egit-0.6-006-PassPhrase.png"/>
170 </p>
171 <ul>
172 <li>click button "Add all branches spec"</li>
173 </ul>
175 <img border="0" src="images/Egit-0.6-007-PushRefSpecifications.png"/>
176 </p>
177 <ul>
178 <li>click "Next" and click "Finish" to confirm the push</li>
179 </ul>
181 <img border="0" src="images/Egit-0.6-008-PushConfirmation.png"/>
182 </p>
183 <ul>
184 <li>the next dialog shows the result of the push operation</li>
185 </ul>
187 <img border="0" src="images/Egit-0.6-009-PushResult.png"/>
188 </p>
189 <ul>
190 <li>point your browser at your GitHub repository to see that your new repository content has arrived</li>
191 </ul>
193 <img border="0" src="images/Egit-0.6-010-PushResultOnGithub.png"/>
194 </p>
195 <h2 id="Fetching_from_other_Repositories">Fetching from other Repositories</h2>
196 <p>TBD</p>
197 <h2 id="Pulling_.28merge_or_rebase.29_new_changes_from_Upstream_Repositories">Pulling (merge or rebase) new changes from Upstream Repositories</h2>
198 <p>This is not yet available. Available alternatives currently include: </p>
199 <ul>
200 <li>run "git pull" from outside eclipse (but
201 <a href="http://marc.info/?l=git&amp;m=123924844219075" target="egit_external">beware on Windows</a>)
202 </li>
203 <li>if you did no local change or want to discard your local changes, use "Team/Reset To..."</li>
204 </ul><hr/>
205 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
206 <tr>
207 <td style="width: 20%" align="left">
208 <a href="Starting-from-existing-Git-Repositories.html" title="Starting from existing Git Repositories">
209 <img alt="Previous" border="0" src="../../images/prev.gif"/>
210 </a>
211 </td>
212 <td style="width: 60%" align="center">
213 <a href="User-Guide.html" title="EGit User Guide">
214 <img alt="EGit User Guide" border="0" src="../../images/home.gif"/>
215 </a>
216 </td>
217 <td style="width: 20%" align="right">
218 <a href="Inspecting-the-state-of-the-Repository.html" title="Inspecting the state of the Repository">
219 <img alt="Next" border="0" src="../../images/next.gif"/>
220 </a>
221 </td>
222 </tr>
223 <tr>
224 <td style="width: 20%" align="left" valign="top">Starting from existing Git Repositories</td>
225 <td style="width: 60%" align="center"></td>
226 <td style="width: 20%" align="right" valign="top">Inspecting the state of the Repository</td>
227 </tr>
228 </table>
229 </body>
230 </html>