为安装git服务做一个记录
1.安装git和openssh
$ sudo apt-get install git-core
$ sudo apt-get install openssh-server
$ sudo apt-get install openssh-client
$git config --global user.name "your name"
$ git config --global user.email your email
2.新增git用户
$ sudo adduser git
3.建立存储仓库,放在home/project_git 下,并且只让git用户对它有权限
$ sudo mkdir /home/project_git
$ sudo chown git:git /home/project_git
4.做一个软链
$sudo ln -s /home/project_git /home/git/repositories
5.生成管理员公约
$ssh-keygen -t rsa 将id_rsa.pub改名放到git服务器上
6.在服务器上/tmp文件夹中
git clone https://github.com/res0nat0r/gitosis.git
cd gitosis
sudo python setup.py install
sudo -H -u git gitosis-init< 改名后.pub
就配置完成了