Gitolite

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m (As ${USER})
m (As ${USER})
 
Line 44: Line 44:
 
#        RW        =  @external
 
#        RW        =  @external
 
EOF
 
EOF
 +
</source>
 +
 +
==Recompile gitolite.conf==
 +
This is useful if you move any repositories, or are installing on a new server... [http://gitolite.com/gitolite/g2/moveserver.html source]
 +
<source lang="bash">
 +
cd "${GITOLITE_ADMIN_REPO}"                        # (the checked-out version... not gitolite's direct repo)
 +
git commit --allow-empty -m "trigger re-compile"
 +
git push
 
</source>
 
</source>

Latest revision as of 10:36, 16 December 2014

Note: This procedure was carried out on a Debian server

Contents

[edit] Useful Links

http://gitolite.com/gitolite/qi.html

[edit] As root

apt-get install gitolite
useradd -rmd /var/lib/gitolite git
cp ~${USER}/.ssh/id_rsa.pub /tmp/${USER}.pub
chown git:git /tmp/${USER}.pub
sudo -u git gl-setup /tmp/${USER}.pub
rm /tmp/${USER}.pub

[edit] As ${USER}

git clone git@localhost:gitolite-admin.git
cd gitolite-admin
cat <<EOF >conf/gitolite.conf
@root     = attie
@internal = attie
@external =
 
repo    gitolite-admin
        RW+     =   @root
 
# this should be at the top
# let root users force push
# let all internal developers read all repositories
repo    @all
        RW+     =   @root
        R       =   @internal
 
repo    testing
        RW+     =   @all
 
# template:
#   this will prevent external/3rd party developers from merging or writing to the release branch
#   releases must be made by internal developers
#repo    therepo
#        RW         =   @internal
#        - release$ =   @external
#        RW         =   @external
EOF

[edit] Recompile gitolite.conf

This is useful if you move any repositories, or are installing on a new server... source

cd "${GITOLITE_ADMIN_REPO}"                        # (the checked-out version... not gitolite's direct repo)
git commit --allow-empty -m "trigger re-compile"
git push
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox