基本上,我无法为 EGit Clone Git Repository 对话框找到可用的 URI。
使用 git 协议(protocol),就像我的命令行克隆操作一样,我尝试了各种 URI,但结果并不令人满意。有时,我无法单击“下一步”按钮:
git://af-blackpearl.site
git:af-blackpearl.site:myproject
在其他情况下,我会尝试(我可以单击“下一步”按钮):
git:af-blackpearl.site/myproject[.git] (with or without extension)
但是,我得到:
Cannot list the available branches.
Reason:
git:af-blackpearl.site/rest-server:ProxyHTTP: java.io.IOException:
proxy error: Service Unavailable
当我尝试时:
git://af-blackpearl.site/myproject[.git] (with or without extension)
git://af-blackpearl.site/
我总是得到类似的东西:
Cannot list the available branches.
Reason:
git://af-blackpearl.site/myproject: Connection refused
非常感谢任何跟进的建议。
有用的背景
- 使用 gitolite 管理 Git
- Linux 主机上的 Git 远程
- 我的“客户端”主机 Linux 正在运行 Eclipse Helios
- 一直在通过命令行使用 Git;效果很好
这个问题专门针对使用 EGit(Eclipse 插件)对话框。它不是关于 Git,使用 Git 甚至安装插件——所有这些看起来都不麻烦。简而言之,我长期以来一直在命令行中使用 Git,现在正尝试使用 Eclipse-Git 集成。
在 /etc/hosts 中,我有一行:
xxx.xxx.xxx.xxx af-blackpearl.site
用于我们本地的 Git 远程存储库。尽管我通过 gitolite-admin 项目管理 Git,但我想在 af-blackpearl.site 上克隆的项目的(物理、文件系统)路径是
/home/git/repositories/myproject.git
在命令行中,我习惯于从源头克隆它,因此取得了一致的成功:
$ git clone git:af-blackpearl.site:myproject
尽管查看了 EGit(Google 托管)文档并进行了大量谷歌搜索,但我还是无法将其适应 EGit Clone Git Repository 对话框(因此达到):
File -> Import... -> Git -> Projects from Git -> Clone
远程连接:
russ@russ-elite-book:~> ssh git@af-blackpearl.site
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.
最佳答案
我也遇到过这个问题。但我在这里找到了一个解决方案:http://www.vogella.com/articles/EGit/article.html#clone_respository
简而言之,写 URI:git@ yourhost.com:repository 而不是 git://这使得 eclipse 连接为用户 git 而不是你的用户名,但仍然使用你的私钥。
我没有设置任何协议(protocol),就像文章中没有设置一样。
编辑:现在我实际上发现“J-16 SDiZ”发布了完全相同的答案。虽然我当时没明白。
关于git - Eclipse Git (EGit) 无法克隆 Git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6996983/