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

By neokrates, written on July 6, 2010

howto

Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
Ad
Poll
  • Which virtualization is used on your Enterprise?

    • We don't use virtulization (90%, 9 Votes)
    • VM Ware (10%, 1 Votes)
    • Virtual Box (0%, 0 Votes)
    • Parallels (0%, 0 Votes)
    • coLinux (0%, 0 Votes)
    • Xen (0%, 0 Votes)
    • OpenVZ (0%, 0 Votes)
    • Something else (0%, 0 Votes)

    Total Voters: 10

    Vote

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:

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:

[v] Ubuntu 9.10
[v] Git
[v] Eclipse Helios
[v] EGit

Should also work for:

[v] most Linux distos
[v] 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)

get-the-url-and-protocols

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

clone-git-reposotory
 
[star] Copy the path for “git clone” (copied in step 1) into “URI” field. Now, git complains about “Host not supported on file protocol”.

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

[star] 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.
[star] Prefix URI with ssh:// . That changes the protocol.
[star] 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
[star] 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.
[star] Enter password for your local private key, if any.
 

clone-git-repository-2

Now, cloning with Git should work.

That’s it, have fun! ;)

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

LEARN MORE (amazon bookstore)

TAGS

RELATED
Pages
Posts

SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

INCOMING SEARCH TERMS


Leave a Reply