Import or clone remote git (gitorious) repository using Eclipse EGit

By neokrates, written on July 6, 2010

howto

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 1,167 views
Rate it
Ad
Poll
  • Your favorite way to manage packages is?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

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.

Works for:

✔ Ubuntu 9.10

✔ Git

✔ Eclipse Helios

✔ EGit

Should also work for:

✔ most Linux distos

✔ any Eclipse with can EGit

1

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).

2

EGit import

In Eclipse: [ Import -> Git -> [Clone BUTTON] ]

3

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”.

💡 On some systems just pasting the right url and setting the protocol seems to be enough. On others, manual steps are needed as well.

⭐ 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.

👉 Important
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! ;)

Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +1 (from 7 votes)
4 votes 'YES'  3 votes 'NO'


TAGS

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS


Leave a Reply