Skip to content

Instantly share code, notes, and snippets.

@khaije1
Last active December 29, 2015 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khaije1/7609848 to your computer and use it in GitHub Desktop.
Save khaije1/7609848 to your computer and use it in GitHub Desktop.
gitolite
# configuration variables for gitolite
# This file is in perl syntax. But you do NOT need to know perl to edit it --
# just mind the commas, use single quotes unless you know what you're doing,
# and make sure the brackets and braces stay matched up!
# (Tip: perl allows a comma after the last item in a list also!)
# HELP for commands (see COMMANDS list below) can be had by running the
# command with "-h" as the sole argument.
# HELP for all the other external programs (the syntactic sugar helpers and
# the various programs/functions in the 8 trigger lists), can be found in
# doc/non-core.mkd (http://sitaramc.github.com/gitolite/non-core.html) or in
# the corresponding source file itself.
%RC = (
# if you're using mirroring, you need a hostname. This is *one* simple
# word, not a full domain name. See documentation if in doubt
# HOSTNAME => 'darkstar',
UMASK => 0077,
# look in the "GIT-CONFIG" section in the README for what to do
GIT_CONFIG_KEYS => '',
# comment out if you don't need all the extra detail in the logfile
LOG_EXTRA => 1,
# settings used by external programs; uncomment and change as needed. You
# can add your own variables for use in your own external programs; take a
# look at the info and desc commands for perl and shell samples.
# used by the CpuTime trigger
# DISPLAY_CPU_TIME => 1,
# CPU_TIME_WARN_LIMIT => 0.1,
# used by the desc command
# WRITER_CAN_UPDATE_DESC => 1,
# used by the info command
# SITE_INFO => 'Please see http://blahblah/gitolite for more help',
# add more roles (like MANAGER, TESTER, ...) here.
# WARNING: if you make changes to this hash, you MUST run 'gitolite
# compile' afterward, and possibly also 'gitolite trigger POST_COMPILE'
ROLES =>
{
READERS => 1,
WRITERS => 1,
},
# uncomment (and change) this if you wish
# DEFAULT_ROLE_PERMS => 'READERS @all',
# comment out or uncomment as needed
# these are available to remote users
COMMANDS =>
{
'git-annex-shell' => 1,
'help' => 1,
'desc' => 1,
# 'fork' => 1,
'info' => 1,
# 'mirror' => 1,
'perms' => 1,
# 'sskm' => 1,
'writable' => 1,
# 'D' => 1,
},
# comment out or uncomment as needed
# these will run in sequence during the conf file parse
SYNTACTIC_SUGAR =>
[
# 'continuation-lines',
# 'keysubdirs-as-groups',
],
# comment out or uncomment as needed
# these will run in sequence to modify the input (arguments and environment)
INPUT =>
[
# 'CpuTime::input',
# 'Shell::input',
# 'Alias::input',
# 'Mirroring::input',
],
# comment out or uncomment as needed
# these will run in sequence just after the first access check is done
ACCESS_1 =>
[
],
# comment out or uncomment as needed
# these will run in sequence just before the actual git command is invoked
PRE_GIT =>
[
# 'renice 10',
# 'Mirroring::pre_git',
# 'partial-copy',
],
# comment out or uncomment as needed
# these will run in sequence just after the second access check is done
ACCESS_2 =>
[
],
# comment out or uncomment as needed
# these will run in sequence after the git command returns
POST_GIT =>
[
# 'Mirroring::post_git',
# 'CpuTime::post_git',
],
# comment out or uncomment as needed
# these will run in sequence before a new wild repo is created
PRE_CREATE =>
[
],
# comment out or uncomment as needed
# these will run in sequence after a new repo is created
POST_CREATE =>
[
'post-compile/update-git-configs',
'post-compile/update-gitweb-access-list',
'post-compile/update-git-daemon-access-list',
],
# comment out or uncomment as needed
# these will run in sequence after post-update
POST_COMPILE =>
[
'post-compile/ssh-authkeys',
'post-compile/update-git-configs',
'post-compile/update-gitweb-access-list',
'post-compile/update-git-daemon-access-list',
],
);
# ------------------------------------------------------------------------------
# per perl rules, this should be the last line in such a file:
1;
# Local variables:
# mode: perl
# End:
# vim: set syn=perl:

Note to the reader: Please take this with a grain of salt. It’s a rough-draft, intended to be informative only, not as a guide

gitolite

  • setup user and dir for first time install
    • sudo adduser --system --dir /srv/git --disabled-password --shell /bin/sh git
    • sudo su - git
  • clear any residual stuffs from the dir
    • .ssh/auth_keys , ~/bin , ~/.gitolite
  • verify ~/bin is in path (probably is, but confirm) in ~/.profile
    • example from ~/.profile
      # set PATH so it includes user's private bin if it exists
      if [ -d "$HOME/bin" ] ; then
          PATH="$HOME/bin:$PATH"
      fi
              
  • clone Sitaram’s gitolite to ~git/.gitolite-upgrade/
  • switch to git-annex branch, cd ~/.gitolite-upgrade && git checkout -t origin/git-annex
  • install
    cd ~
    .gitolite-upgrade/install -to "${HOME}/bin"
        
  • create key-pair, move pub-key to ~/.gitolite-upgrade/gitolite.id_dsa.pub
  • setup w/ initial admin key
    gitolite setup -pk .gitolite-upgrade/gitolite.id_dsa.pub
        
  • enable git-annex-shell, open ~/.gitolite.rc and insert ‘git-annex-shell => ua’ into the hash list
    * in COMMANDS hash in the rc file, add an entry like this:
      'git-annex-shell' => 'ua',
        
  • all done!

git-annex

  • install sudo aptitude install git-annex
  • config a repo
    • the ability to modify annex’d content can be regulated w/ gitolite perms
      repo example
           RW  git-annex       =       ppl.few
           RW  synced/*        =       ppl.few
           R                   =       ppl.some
           _                   =       ppl.most
              
    • access to the git-annex branch allows for information from about annex’d files to propagate
    • access to synced/* branches , (ex. synced/master) allows information about the annex’d files placement in particular branches (ex. master) to propagate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment