master TOC | chapter TOC | support
all scripts and libraries must be in the same directory. However, RPM/DEB
packagers can put the libraries where they want, as long as they can be
found in perl's default @INC.
gl-auth-command requires an actual ~/.gitolite.rc (except if your
initials are "JK" or "DG", in which case /etc/gitolite/gitolite.rc also
works!) It knows how to look around and set env vars etc correctly
all programs except gl-auth-command require the environment variables
GL_RC and GL_BINDIR set properly. Your best bet is to run them via
gl-auth-command, like so:
path/to/gl-auth-command -e other_program other_program_arguments
In any case none of these programs are meant to be run manually -- pretty much all of them are run via gl-auth-command or from something that was forked from it so the variables will exist during normal operation.
The 'rc' file has one major change from v1: any new values in the rc file need
to be added to the @EXPORT list in src/gitolite_rc.pm.
There are 3 "modules" (gitolite_rc, gitolite_env, and gitolite itself).
Their purposes should be fairly obvious.
The importance of GL_BINDIR is that the command= argument in
~/.ssh/authorized_keys must be a full path, ideally, and the compile script
gets this from GL_BINDIR.
for frequently run perl programs, I prefer my method
"their" ideal is "FindBin". I will use it only on manually or infrequently run programs
a perl program called gl-query-rc finds its own BINDIR (using my perl
method, not FindBin). This is suitable for calling from shell scripts
as ${0%/*}/gl-query-rc GL_BINDIR
~/.ssh/authorized_keys to get the actual
BINDIR in use!Fedora has a very special setup, as follows:
trusted users have "gl-auth-command -s" meaning they can get a shell if they want to
actual git repos are under "git" (or some such), and include the chmod g+s (git init --shared) unix perms tricks for shared access. (Starting with git 1.7.something, you would also need to explicitly delete the new receive.denyNonFastForwards setting that git seems to default to when you use --shared).
but since they're coming through gl-auth, branch-level acls are in effect
the gitolite config file is generated from some database and compiled (all via cron)
the keydir/ is empty; in fact they probably don't use the admin repo at all, AFAIK
The most important implication of this setup is that the RC file is no
longer is $HOME of the 'git' user. They keep it in
/etc/gitolite/gitolite.rc. This means that a properly setup rc file must
already be present in /etc/gitolite/gitolite.rc before doing any such
installs.
There are also some other "impedance mismatches" that may show up. For
example, the gl-setup triggered by detecting a change in $data_version
following an RPM update once caused problems. This auto-update is designed to
run on the next "hit" of any kind (which arguably makes things very easy in
normal installations), but in Fedora's case it also means it runs as that
user. Who may not have "write" access to $GL_ADMINDIR! So the compile
fails, and you now have new code trying to work with old format data.
The solution is to explicitly run a compile, from a properly privileged userid, as soon as you do an RPM upgrade.