首先获得安装文件
wget https://downloads.bitnami.com/files/stacks/redmine/2.6.1-0/bitnami-redmine-2.6.1-0-linux-x64-installer.run
chmod +x https://downloads.bitnami.com/files/stacks/redmine/2.6.1-0/bitnami-redmine-2.6.1-0-linux-x64-installer.run
./bitnami-redmine-2.6.1-0-linux-x64-installer.run
安装完成后,访问http://主机IP:8080/redmine/即可登录
登录完成后建立一个测试用的项目test
下面开始安装git服务器
安装python-setuptools
sudo apt-get install python-setuptools
<pre name="code" class="java">https://github.com/tv42/gitosis.git进入gitosis目录
cd gitosis
python setup.py install
创建git账号
sudo useradd -c 'git version manage' -m -d /home/git -s bin/bash git
将客户端生产的秘钥上传到服务器,生成方法见生成秘钥
初始化git
sudo -H -u git gitosis-init < /home/git/id_rsa.pub显示如下信息则成功
#Initialized empty Git repository in /home/git/repositories/gitosis-admin.git/ #Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/修改post-update权限
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
git clone git@主机IP:gitosis-admin.git
打开配置文件,增加下面的内容,并将另一台机器的公钥recwert@webca.cc.pub置于公钥目录下
[group webca] writable = webca members = victor@webca.cc recwert@webca.cc
mkdir webca cd webca git init touch README.md git add README.md git commit -m "init webca" git remote add origin git@主机IP:webca.git git push origin master
这时候可能会出现404,可能的原因是webca.git的权限不够,为了避免日后不必要的麻烦,直接给777的权限给该目录,刷新即可看到该版本库的提交信息
原文地址:http://blog.csdn.net/sbsujjbcy/article/details/42684945