Git
CentOS

gitoliteインストール

More than 5 years have passed since last update.


環境


  • CentOS5

  • git 1.7.3.4


参考

http://please-sleep.cou929.nu/intorducing-gitolite.html

http://d.zeromemory.info/2012/03/20/git-gitolite.html


作業手順


gitoliteユーザ作成


gitoliteユーザ作成

sudo /usr/sbin/useradd -m -s /bin/sh gitolite

sudo passwd gitolite
sudo mkdir -m 700 /home/gitolite/.ssh
sudo chown -R gitolite:gitelite /home/gitolite


sshd_configのAllowUserを追加してreload


gitoliteユーザ作成

sudo service sshd reload



gitoliteインストール

git clone git://github.com/sitaramc/gitolite

cd gitolite
sudo src/gl-system-install
cp .ssh/authorized_keys /tmp/hazy.pub
gl-setup -q /tmp/hazy.pub

gl-system-install時にこんなのでたけど気にしない


using default values for EUID=0:

/usr/local/bin, /var/gitolite/conf, /var/> gitolite/hooks

***** WARNING *****

gl-setup is not in your $PATH.

Since gl-setup MUST be run from the PATH (and not as src/gl-setup or

such), you must fix this before running gl-setup. Just add

   PATH=/usr/local/bin:$PATH

to the end of your bashrc or similar file. You can even simply do that

manually each time you log in and want to run a gitolite command.



gitolite管理用レポジトリをclone

git clone ssh://gitolite@nebula/gitolite-admin.git

あとはkeydirに認証鍵を足したり、設定ファイルをいじってレポジトリ追加したりすればオーケーらしい。