Import or clone remote git (gitorious) repository using Eclipse EGitBy neokrates, written on July 6, 2010
I first had problems, how simple “git clone” can be done using Eclipse Egit. After it worked I decided to write a small how-to.
Basically, I have a remote repository in Gitorious and want it in Eclipse.
✔ Ubuntu 9.10
✔ Eclipse Helios
Should also work for:
✔ most Linux distos
✔ any Eclipse with can EGit
Get the Uri and protocols
Gitorious shows the proper Uri. Select your project in Gitorious in web browser and then go to your Repository.
You see “Clone & push urls” (1).
We will need this info:
➕ which protocols are enabled (2) (default is “ssh”)
➕ path for “git clone” (3) (copy it)
You can learn more about basic operations on particular repository using ” ? ” in repo view (4).
In Eclipse: [ Import -> Git -> [Clone BUTTON] ]
Fill in data in “Clone Git Repository” dialog
⭐ Copy the path for “git clone” (copied in step 1) into “URI” field. Now, git complains about “Host not supported on file protocol”.
⭐ Set the protocol drop down list to be ssh:// if that is the protocol your gitorious shows. Try the [ Next >] button. If it works, go to the step with entering the password. Skip the manual steps described next.
⭐ Prefix URI with ssh:// . That changes the protocol.
⭐ In host, make sure only host Url is shown, not host.name:project-name (for some reason my Gui always sets it this way). Copy project-name to the ‘repository-path’ input field instead
⭐ Do “Next >”. You will be asked for the pass phrase for your SSH “.rsa” or “.dsa” key.
Here Gitorious expects that you have your private key from the key pair locally. The public key must have been previously stored in the Gitorious.
⭐ Enter password for your local private key, if any.
Now, cloning with Git should work.
That’s it, have fun! ;)
INCOMING SEARCH TERMS