建立个简单的git server: gitosis ( gitosis: setting up a git server without complex authorization)

访问量: 1639

注意: Gitosis 已经过时了,貌似不再维护。建议使用 gitolite. ( gitosis is long-defunct , let's use gitolite instead ) . 所以我安装到倒数第二步的时候就放弃了。 参考: http://engineeredweb.com/blog/10/2/building-your-own-git-server/

如果每个核心成员都拥有一样的权限,那么GIT SERVER就非常简单了。 ( it's very simple to setup a git server if every committer has the same authorization ) 

1. $ sudo apt-get install git-core

2. setup git user:

sudo adduser \
--system \
--shell /bin/sh \
--gecos ‘git version control’ \
--group \
--disabled-password \
--home /home/git \
git

3. $ su git
$ mkdir ~/repositories

4. $ su sg552
$ sudo apt-get install python-setuptools ( which is used for gitosis' setup)

5. get and setup gitosis :

cd /tmp
git clone https://github.com/res0nat0r/gitosis.git
cd gitosis
sudo python setup.py install

6. $ gitosis-init <~/.ssh/id_rsa.pub

7. $ cd /sg552/apps && git clone sg552@192.168.1.36:gitosis-admin.git  ( don't use: localhost as the server address) 

8. $ edit your config file and submit ( sorry but I failed ) 

参考(refer to ) : https://github.com/res0nat0r/gitosis

订阅/RSS Feed

Subscribe

分类/category