[李景山php] 阿里云服务器 ubuntu 搭建 git 服务器
来源:互联网 发布:数据库的主要逻辑模型 编辑:程序博客网 时间:2024/05/19 02:03
说明:本次测试使用的是 ubuntu16, 用户是root
安装git服务器,关键点 git-core
第一步:更新服务器
apt-get update
第二步:安装核心组件
apt-get install git-core openssh-server openssh-client
配置git用户
第三步:添加git 系统用户及 指定 git 用户组,并且指定相应的shell.
adduser –system –shell /bin/bash –group git
执行后的效果:
root@iZuf6f244t8ycx65un19waZ:~# adduser --system --shell /bin/bash --group gitAdding system user `git' (UID 110) ...Adding new group `git' (GID 119) ...Adding new user `git' (UID 110) with group `git' ...Creating home directory `/home/git' ...
第四步:添加git 帐号到 ssh组,防止 git帐号不能远程使用 adduser git ssh
root@iZuf6f244t8ycx65un19waZ:~# adduser git sshAdding user `git' to group `ssh' ...Adding user git to group sshDone.
第六步:更新git帐号密码 passwd git
root@iZuf6f244t8ycx65un19waZ:~# passwd gitEnter new UNIX password: Retype new UNIX password: passwd: password updated successfully
配置git仓库
第七步:创建仓库文件夹
mkdir /home/git/repositories
第八步:改变所属组及所有者
chown git:git /home/git/repositories
第九步:设置目录权限
chmod 755 /home/git/repositories
在对应的位置初始化空仓库:
root@iZuf6f244t8ycx65un19waZ:/home/git/repositories# git init --bare
执行效果:
Initialized empty Git repository in /home/git/repositories/
安装gitosis 配置权限策略
Gitosis 就是一套用来管理 authorized_keys文件和实现简单连接限制的脚本。简单地说,Gitosis就是git的权限策略控制器。
因为安装gitosis 需要python的 setuptools 工具,所以需要安装一下这个工具
第十步:安装python工具
apt-get install python-setuptools
第十一步:下载/克隆 gitosis 源码
git clone https://github.com/res0nat0r/gitosis.git
注意:中间的两个是0 ,数字0.
第十二步:安装 gitosis工具,
cd gitosis/python setup.py install
执行结果:
Using /usr/lib/python2.7/dist-packagesFinished processing dependencies for gitosis==0.2
阅读全文
0 0
- [李景山php] 阿里云服务器 ubuntu 搭建 git 服务器
- 阿里云Ubuntu搭建git服务器
- 阿里云git服务器搭建
- 一步步在阿里云的Ubuntu服务器上搭建自己的Git服务器
- 阿里云下搭建Git服务器
- 阿里云Centos7 搭建Git服务器仓库
- 在阿里云上搭建Git 服务器
- 阿里云 linux搭建git服务器
- 阿里云服务器(Ubuntu 12.04 64位)搭建 Nginx、MySQL、PHP Web服务器 (一)
- 阿里云服务器(Ubuntu 12.04 64位)搭建 Nginx、MySQL、PHP Web服务器 (二)
- 阿里云Ubuntu系统搭建SVN服务器
- 阿里云服务器搭建后台(Ubuntu)
- ubuntu搭建Git 服务器
- Ubuntu搭建Git服务器
- Ubuntu Git服务器搭建
- ubuntu搭建git服务器
- ubuntu git 服务器搭建
- ubuntu搭建git服务器
- datatbles在ie下无法加载
- 获取文件的绝对路径, GetCurrentDirectory()和GetModuleFileName()函数的区别
- 常用正则表达式
- JPA注解使用小结
- 微信后台开发第一步:nodeJS+express接入微信后台详细教程
- [李景山php] 阿里云服务器 ubuntu 搭建 git 服务器
- jquery 根据多个class获取元素
- 检查PHP脚本的执行效率(xdebug)
- Intellij IDEA 快捷键
- linux vps 挂载硬盘
- RSA加密与解密(比较详细))
- 数据/方法论固然重要,但人为分析更有价值!
- PHP实现获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
- 利用Eclipse开发WSDL类型的webservice以及发布过程