首先在Client端安装git,生成ssh公钥
sudo apt-get install git-core ssh-keygen -t rsa
下面在server上配置,首先安装gitolite:
sudo apt-get install gitolite
在server端添加git用户
sudo adduser \ --system \ --shell /bin/bash \ --gecos 'git version control' \ --group \ --disabled-password \ --home /home/git \ git用刚才copy过来的公钥设置gl,注意修改配置文件(个itwe)
gl-setup /tmp/rachel.pub # change $REPO_UMASK = 0077; to $REPO_UMASK = 0027; # gets you 'rwxr-x---'最后在client端clone管理用的project,就可亿在client上 管理git server了
git clone git@<server>:gitolite-admin.git
GitWeb
sudo apt-get install highlight gitweb sudo vim /etc/gitweb.conf # change $projectroot to /home/git/repositories # change $projects_list to /home/git/projects.list sudo usermod -a -G git www-data sudo chmod g+r /home/git/projects.list sudo chmod -R g+rx /home/git/repositories sudo service apache2 restart参考countableSet
No comments:
Post a Comment