Reputation: 18643
Basically, I can't find a workable URI for the EGit Clone Git Repository dialog.
Using protocol git, just as from my command-line clone operation, I've tried various URIs with unsatisfactory results. Sometimes, I can't click the Next button:
git://af-blackpearl.site
git:af-blackpearl.site:myproject
In other cases, I try (and I can click the Next button):
git:af-blackpearl.site/myproject[.git] (with or without extension)
but, I get:
Cannot list the available branches.
Reason:
git:af-blackpearl.site/rest-server:ProxyHTTP: java.io.IOException:
proxy error: Service Unavailable
When I try:
git://af-blackpearl.site/myproject[.git] (with or without extension)
git://af-blackpearl.site/
I always get something like:
Cannot list the available branches.
Reason:
git://af-blackpearl.site/myproject: Connection refused
Many thanks for any suggestion to follow up on.
Useful Background
This question is specifically about using the EGit (Eclipse plug-in) dialog. It is not about Git, using Git or even installing the plug-in--all of which do not seem troublesome. Simply, I've long been using Git from the command line and am just trying to use the Eclipse-Git integration now.
In /etc/hosts, I have a line:
xxx.xxx.xxx.xxx af-blackpearl.site
for our local Git remote repository. Though I administer Git via a gitolite-admin project, the (physical, filesystem) path to the project I'd like to clone on af-blackpearl.site is
/home/git/repositories/myproject.git
From the command line, I'm used to cloning it from origin thus with consistent success:
$ git clone git:af-blackpearl.site:myproject
Despite looking at the EGit (Google-hosted) documentation and much Googling, I'm having trouble adapting this to the EGit Clone Git Repository dialog (reached thus):
File -> Import... -> Git -> Projects from Git -> Clone
Connection to remote:
russ@russ-elite-book:~> ssh [email protected]
PTY allocation request failed on channel 0
hello russ, the gitolite version here is v2.0.1-2-g836faf9
the gitolite config gives you the following access:
R W NavigationServlet
R W gitolite-admin
R W ivysample
R W myproject
R W seam-catch
Connection to af-blackpearl.site closed.
Upvotes: 3
Views: 22816
Reputation: 364
I too had problems with this. But I found a solution presented here: http://www.vogella.com/articles/EGit/article.html#clone_respository
In short, write URI: git@ yourhost.com:repository instead of git:// This makes eclipse connect as user git instead of your username, but still use your private key.
I did not set any protocol, just as the article does not.
EDIT: Now I actually found that "J-16 SDiZ" posted quite the same answer. Although I didn't get it at that time.
Upvotes: 5
Reputation: 9798
I had the same problem, I checked the eclipse configuration of SSH2 and found it correctly points to the "~/.ssh"
The problem was that I did not have any keys there (id_rsa & id_rsa.pub) I added them, tried again, I pulled successfully my github repo.
Upvotes: 0
Reputation: 5734
You may want to try using the full server path to your git repository.
I am in the process of implementing my first project using git. I am using the git service offered by my shared Linux hosting plan (1and1).
After a lot of trial and error I seem to be able to find the git repository if I use the full server path to it.
In my case:
My git repository was created at /project
The only path that seems to let me find the git repository is:
/homepages/foo/bar/htdocs/project/.git <- this is the full server path at 1and1.
I am using the SSH protocol.
It doesn't make sense that I have to use the full path because when I ssh to my account I get to my account home. But any other combination I tried doesn't work.
If you are curious to see the exact configuration I used to access my git repository in my shared host, check this question -> Problems cloning 1and1 git repository in 1and1 shared Linux server with Eclipse EGit
Good luck!
Upvotes: 0
Reputation: 1752
I had the same problems you describe connecting to remote git repositories through the EGit dialogs.
What I've ended up doing is still using the command line git tools to clone repos and stuff, and then import the repos into Eclipse as local repos. As far as I can tell that makes all of EGits functionality working perfectly, and I've used Eclipse to add, commit, push and change branches and all worked flawlessly.
I still use the command line tools for a lot of tasks, and this gives me the best of both worlds IMHO. But initially it bugged the hell out of me that I could not get EGit to clone remote repositories directly.
I know it's not a direct answer to your question, but Eclipse with EGit is fully functional without cloning remotely from within EGit.
Upvotes: 0
Reputation: 26910
If you are using the SSH protocol (I saw you use "ssh [email protected]"), you should choose "ssh" in protocol. The repository name is myproject (no .git
part)
Upvotes: 2