Re: [gitolite] Hosting server config with gitolite

16 views
Skip to first unread message

Sitaram Chamarty

unread,
Mar 26, 2013, 6:29:43 PM3/26/13
to Todd Taft, gito...@googlegroups.com
On Wed, Mar 27, 2013 at 12:29 AM, Todd Taft <todd...@unc.edu> wrote:
> I'd like to use git/gitolite to manage the configuration files for a variety
> of servers that I have (e.g. Apache). If gitolite is running on server1 and
> the service that I'm managing (e.g. Apache) is on server2, how do I
> configure gitolite on server1 so that when changes are pushed to it, it
> pushes the changes out to server2? I'd like for server2 to just have a copy
> of the files in the master branch without the "extra" git stuff, such as the
> .git directory. Both servers are running Linux and I can ssh/scp from
> server1 to server2 as the gitolite user, but I haven't been able to figure
> out how to write hooks to do what I want. So, how do I do this?

That's a "deploy" thing. See http://gitolite.com/the-list-and-irc/deploy.html
(and please note that the gitolite.com in the URL is just a coincidence and a
result of bad URL planning on my part -- that document does not actually have
anything to do with gitolite at all).

The part where you do need gitolite is how to *install* these hooks once
you've written them: http://gitolite.com/gitolite/cust.html#hooks is a good
starting point.

milki

unread,
Mar 26, 2013, 6:30:49 PM3/26/13
to Todd Taft, gito...@googlegroups.com
On 11:59 Tue 26 Mar , Todd Taft wrote:
> I'd like to use git/gitolite to manage the configuration files for a variety of servers that I have (e.g. Apache). If gitolite is running on server1 and the service that I'm managing (e.g. Apache) is on server2, how do I configure gitolite on server1 so that when changes are pushed to it, it pushes the changes out to server2? I'd like for server2 to just have a copy of the files in the master branch without the "extra" git stuff, such as the .git directory. Both servers are running Linux and I can ssh/scp from server1 to server2 as the gitolite user, but I haven't been able to figure out how to write hooks to do what I want. So, how do I do this?

This falls under the !deploy scenario:
15:29 -gitinfo(ja...@infobot.gitrecipes.de)- Git is not a deployment tool, but
you can build one around it(in simple environments) or use it as an
object store(for complex ones). Here are some options/ideas to get
you started: http://gitolite.com/the-list-and-irc/deploy.html

It just so happens you deploy to a different server instead.

On a note though, its probably easier to have a git repo on server2 so
your deploy operation is local to the server.

--
milki
Reply all
Reply to author
Forward
0 new messages