标签:cat 环境要求 apt-get chm 安装 host ant author gen
$ sudo apt-get install ssh # 安装
$ sudo /etc/init.d/ssh start # 启动
$ sudo vi /etc/rc.local # 添加到开机启动
$ sudo apt-get install vsftpd
$ sudo /etc/init.d/vsftpd start
$ sudo vi /etc/rc.local
$ sudo apt-get install git-core
$ sudo adduser git
$ su - git # 切换到git用户
$ git clone git://github.com/sitaramc/gitolite # 辅助管理Git权限
$ mkdir bin
$ gitolite/install -to ~/bin
RSAAuthentication yes #开启RSA认证功能
PubkeyAuthentication yes #开启公匙认证
AuthorizedKeysFile .ssh/authorized_keys #公钥文件位置
StricModes no #据说不改会强制要求登录用户和文件拥有者用户相同
$ ssh-keygen -t rsa # 默认文件为.ssh/id_rsa.pub
$ scp .ssh/id_rsa.pub git@host:admin.pub
$ bin/gitolite setup -pk admin.pub # 添加客户端公钥文件到授权密钥中
$ chmod 700 -R .ssh
$ chmod 600 .ssh/authorized_keys
$ git clone git@host:gitolite-admin
$ mv alice.pub gitolite-admin/keydir # 配置有授权的成员
$ vi gitolite-admin/conf/gitolite.conf # 添加受管理的repo (repo foo \n RW+ = admin RW = alice)
$ git add conf
$ git add keydir
$ git commit -m "added foo, gave access to alice"
$ git push
标签:cat 环境要求 apt-get chm 安装 host ant author gen
原文地址:http://www.cnblogs.com/LilyWuHen/p/6905626.html