Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitolite local working copy for Apache DocumentRoot

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?

like image 567
Colin M Avatar asked Dec 21 '22 14:12

Colin M


1 Answers

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.

like image 116
VonC Avatar answered Jan 05 '23 03:01

VonC