Apache DocumentRoot 的 Gitolite 本地工作副本

发布于 2024-11-05 03:17:35 字数 502 浏览 4 评论 0原文

我有一个使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

草莓酥 2024-11-12 03:17:35

您正在为您的克隆使用本地协议,这意味着您完全绕过了gitolite( gitolite 脚本是通过 ssh 强制命令 调用的。

您应该在开发服务器上进行第二个克隆,使用 gitolite 兼容地址,例如:

git clone git@gitoliteserver:myrepo.git

第二个存储库将能够向 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:

git clone git@gitoliteserver:myrepo.git

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.

挽清梦 2024-11-12 03:17:35

如果您需要使用本地协议,您只需设置GL_BYPASS_UPDATE_HOOK 环境变量为 1

gorgo@somegitoliteserver:~/testing$ GL_BYPASS_UPDATE_HOOK=1 git push
Counting objects: 3, done.
Delta compression using up to 3 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 234 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
To file:///home/gitolite/repositories/testing.git/
96be337..ab5ca6d  master -> master

If you require using the local protocol, all you need is to set GL_BYPASS_UPDATE_HOOK environment variable to 1:

gorgo@somegitoliteserver:~/testing$ GL_BYPASS_UPDATE_HOOK=1 git push
Counting objects: 3, done.
Delta compression using up to 3 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 234 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
To file:///home/gitolite/repositories/testing.git/
96be337..ab5ca6d  master -> master
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文