让 GitHub 和 Gerrit 和谐相处
我在 GitHub 上托管一个私人存储库。我还想使用 Gerrit,特别是对于 Hudson Gerrit 触发器插件。 AFAICT,没有任何简单的解决方案可以将它们一起使用。
对于以下任何需求,我将不胜感激。
我想要
我尝试过的
克隆/添加...
手动:我照常克隆存储库,然后像这样添加到 H2
中:
INSERT INTO projects
(use_contributor_agreements,submit_type,name)
VALUES
('N','M','new/Repo');
在 期间init
:
*** Git Repositories
***
Location of Git repositories [git]: [email protected]:YourName/Repo.git
我认为这是不正确的。
会发生什么情况
克隆/添加...
手动
:我收到此错误:未找到存储库:无法打开存储库存储库
在init
< /strong>:
在 ~/gerrit2/[email protected]< 处创建目录/a>:YourName/Repo.git
和子目录 Repo.git
,它本身包含一个空的 Git
存储库。不完全是我想要的。
I host a private repo on GitHub. I also want to use Gerrit, particularly for the Hudson Gerrit Trigger plugin. AFAICT, there isn't any simple solution for using them together.
I'd appreciate any help on any of the following wants.
What I want
- Clone GitHub repo and add to Gerrit's projects either:
- Merge changes with GitHub using Gerrit
What I've tried
Cloning/Adding...
Manually: I clone the repo as normal, then add into H2
like so:
INSERT INTO projects
(use_contributor_agreements,submit_type,name)
VALUES
('N','M','new/Repo');
During init
:
*** Git Repositories
***
Location of Git repositories [git]: [email protected]:YourName/Repo.git
I don't think that's correct.
What happens
Cloning/Adding...
Manually:
I get this error: repository not found: Cannot open repository Repo
During init
:
Creates the directory at ~/gerrit2/[email protected]:YourName/Repo.git
and sub-directory Repo.git
, which itself contains an empty Git
repo. Not exactly what I wanted.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我自己不尝试,但您可以使用 gerrit repo 和 mirror 到 github
Not try myself, but you could use gerrit repo and mirror to github
Gerrit 构建于 JGit 之上,不支持远程 GitHub 存储库。
JGit 本身允许将存储库放在本地(或共享)文件系统上,或者通过通用“DFS”访问它(分布式文件系统)提供商。
请参阅参考:JGit:连接到远程存储库。
我写了一篇关于一起使用 Gerrit 和 GitHub 的不同策略的文章: http:// /www.packtpub.com/article/using-gerrit-with-github
简而言之,您可以将三个不同的任务委托给 GitHub:
注意:一旦开始使用 Gerrit 作为 GitHub 的网关,您就不应该推送更改不再直接发送到 GitHub,而是依赖 Pull 请求(导入到 Gerrit)或直接推送到 Gerrit 并通过变更审核。
如果你想尝试以这种方式集成 Gerrit 和 GitHub,你可以查看 http://gerrithub.io,其中本质上是一个 Gerrit 2.9-SNAPSHOT,其 GitHub 插件的配置与之前一样。
卢卡.
Gerrit is built on top of JGit which does not support a remote GitHub repository.
JGit itself allows to either have the repository on your local (or shared) filesystem or to have it accessible through a genefic "DFS" (Distributed File System) provider.
See as reference: JGit : connect to distant repository.
I wrote an article on a different strategy to use Gerrit and GitHub together: http://www.packtpub.com/article/using-gerrit-with-github
In a nutshell you can delegate three different tasks to GitHub:
NOTE: Once you start using Gerrit as your gateway to GitHub, you SHOULD NOT push directly to GitHub anymore but rely on either Pull Requests (imported to Gerrit) or directly pushing to Gerrit and working through changes review.
If you want to experiment Gerrit and GitHub integrated in this way, you can check out http://gerrithub.io, which is essentially a Gerrit 2.9-SNAPSHOT with the GitHub plugin configured as before.
Luca.