Local working version of Gitolite for Apache DocumentRoot

I have a system setup with git and guitarolite. Everything works well, except that I want my structure to be like this:

Local Environment β†’ Development Server β†’ Production Server

I have a repo setup on a dev server and it has been successfully cloned to a local environment. Now I need a working copy of the local file system on the development server, but I'm not sure how to do this with gitolit.

git clone /home/gitolote/repositories/myrepo.git 

It works fine until I try to push / pull, and at that moment I get the following:

 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 guitarite?

+4
source share
2 answers

You use the local protocol for your clone, which means that you completely bypass the gitolit (the gitolit script is invoked through the forced ssh command ).

You must make a second clone on your development server using a gitolite-compatible address, for example:

 git clone git@gitoliteserver :myrepo.git 

The second repo could push / bring to / from the gitolite server, providing a "working copy of the local file system" on the development server that you are after.

+8
source

If you need to use the local protocol , you only need to set the GL_BYPASS_UPDATE_HOOK environment GL_BYPASS_UPDATE_HOOK 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 
+3
source

All Articles