gitosis git服务器架设软件
Git是非常著名的分布式版本控制系统。 Gitosis则是方便通过Git与ssh架设中央服务器的软件。这篇文章的安装流程写得很明了,但使用中还是遇到了些许问题,本文算是该流程的补充。如果打算通过Gitosis架设服务器通过本文或许可以少走不少弯路。 一、架设步骤 1. 下载并安装python setuptools sudo apt-get install python-setuptools 2. 下载并安装gitosis cd ~/src git clone git://eagain.net/gitosis.git cd gitosis python setup.py install 3. 添加用户git sudo adduser \ --system \ --shell /bin/sh \ --gecos 'git version control' \ --group \ --disabled-password \ --home /home/git \ git 4. 生成本机密钥 切换到个人机,如果已有~/.ssh/id_rsa.pub略过此步 ssh-keygen -t rsa 5. 上传密钥到服务器临时目录 scp ~/.ssh/id_rsa.pub 用户名@主机:/tmp 6. 初使化gitosis 切回到服务器 sudo -H -u git gitosis-init < /tmp/id_rsa.pub 7. 修改post-update权限 sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update 8. clone gitosis管理平台 git clone git@主机名:gitosis-admin.git cd gitosis-admin 9. 安装完成 通过修改gitosis-admin管理gitosis用户权限 添加公密到keydir,添加用户 修改完后commit,push到中服务器即可完成仓库权限的相关操作。 二、实例 目标:添加用户 john 和仓库 foo 到gitosis,并和管理员miao合作管理 1. 用户john添加并发送id_rsa.pub给miao john:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/john/.ssh/id_rsa): Created directory '/home/john/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/john/.ssh/id_rsa. Your public key has been saved in /home/john/.ssh/id_rsa.pub. john:~$ cp /home/john/.ssh/id_rsa.pub /tmp
- 1
- 粉丝: 0
- 资源: 4
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 实施+BIOS+操作系统+用于电脑重装系统
- 736524484973749Themes_2.2.8.6-global.apk
- 读入一段音频后添加不同种类的噪声;分别采用滑动平均滤波器,中值滤波、直接频域滤波等方法去除噪声
- 哥哥-2405051016.awb
- 基于matlab实现的文档+程序 关于粒子群算法的doc文档,里面包含matlab源程序.rar
- 基于matlab实现的文档+程序 鲸鱼优化算法和粒子群优化.rar
- 基于matlab实现的文档+程序 蚁群算法求解旅行商问题TSP,bp求解判断iris花的品种.rar
- 基于matlab实现的一些优化算法,如基因,粒子群,布谷鸟,差分进化算法,模拟退火算法,带压缩因子的粒子群优化等.rar
- 基于matlab实现的遗传算法、免疫算法、退火算法、粒子群算法、鱼群算法、蚁群算法和神经网络算法等常用智能算法的MATLAB实现
- 基于matlab实现的蚁群算法是模拟蚁群觅食行为的一种优化算法