문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top