Apache DocumentRoot 的 Gitolite 本地工作副本
我有一个使用 git 和 gitolite 的系统设置。一切都运行良好,除了我希望我的结构是这样的:
本地环境 ->开发服务器->生产服务器
我在开发服务器上设置了一个存储库,并且它已成功克隆到本地环境。现在,我需要的是开发服务器上的本地文件系统工作副本,但我不知道如何使用 gitolite 来做到这一点。
git clone /home/gitolote/repositories/myrepo.git
工作正常,直到我尝试推/拉,此时我得到了这个:
remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master
关于如何使用 gitolite 执行此操作的任何想法?
I have a system setup with git and gitolite. All is working well, except I want my structure to be like this:
Local Environment -> Development Server -> Production Server
I have a repo setup on the dev server, and it's successfully cloned down to the local environment. Now, what I need is a local filesystem working copy on the development server but I'm not sure how to do this with gitolite.
git clone /home/gitolote/repositories/myrepo.git
Works fine until I try to push/pull, at which point I get this:
remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master
Any ideas on how to do this with gitolite?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在为您的克隆使用本地协议,这意味着您完全绕过了gitolite( gitolite 脚本是通过 ssh 强制命令 调用的。
您应该在开发服务器上进行第二个克隆,使用 gitolite 兼容地址,例如:
第二个存储库将能够向 gitolite 服务器推送/拉取,同时在您所在的开发服务器上提供“本地文件系统工作副本”后。
You are using the local protocol for your clone, which means you are bypassing gitolite entirely (the gitolite script is called through a ssh forced command).
You should make a second clone on your development server, using a gitolite compatible address like:
That second repo would be able to push/pull to/from the gitolite server, while providing the "local filesystem working copy" on the development server you are after.
如果您需要使用本地协议,您只需设置
GL_BYPASS_UPDATE_HOOK
环境变量为1
:If you require using the local protocol, all you need is to set
GL_BYPASS_UPDATE_HOOK
environment variable to1
: