瑞雪年

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: :: 订阅 订阅 :: 管理 ::

1. install git:

sudo apt-get install git-core git-doc

 

2. create gitolite user:

sudo addgroup gitolite
sudo adduser –disabled-password –home /home/gitolite –ingroup gitolite gitolite

 

3. install gitolite:

sudo apt-get -y install gitolite

 

4. setup gitolite:

sudo usermod -a -G gitolite www-data
sudo service apache2 restart

sudo su – gitolite

gl-setup /tmp/your-username-goes-here.pub

 

5. edit .gitolite.rc:

$REPO_UMASK = 0027

 

6. manage gitolite:

# FROM YOUR LOCAL MACHINE
git clone gitolite@git.server:gitolite-admin.git

 

# FROM YOUR LOCAL MACHINE
cd gitolite-admin
emacs conf/gitolite.conf
# change to:
repo testing
RW+ = @all
R = daemon
testing “Owner” = “Test repo”

 

git add conf/gitolite.conf
git commit -m “Enabled gitweb and git-daemon export for testing repo”
git push

7. install gitweb:

sudo apt-get install highlight gitweb

sudo emacs /etc/gitweb.conf
# change $projectroot to /home/gitolite/repositories
# change $projects_list to /home/gitolite/projects.list

 

8. add user:

put "account-name.put" into "gitolite-admin/keypair"

edit "conf/gitolite.conf", change to

@developer root, account-name

 

*Reference:

http://blog.airmio.com/2012/05/install-git-server-on-ubuntu-12/

posted on 2012-06-05 16:34  瑞雪年  阅读(1278)  评论(0编辑  收藏  举报