ubuntu搭建git服务器

本文详细介绍了如何在Ubuntu系统中安装Git,并提供了搭建Git服务器的具体步骤,包括创建git用户、初始化裸仓库及权限配置等。

安装git

先使用将ppa源加入Ubuntu
sudo add-apt-repository ppa:pdoes/ppa

2、然后根据提示,输入回车。加入密钥

3、输入以下命令
sudo apt-get update
sudo apt-get install git-core

ok,完成了。
linux服务器搭建git服务器方法:http://www.linuxdiyf.com/linux/14680.html
Ubuntu Git服务器搭建及Gitosis安装设置:http://www.linuxdiyf.com/linux/14589.html
搭建git服务器(fedora22-server):http://www.linuxdiyf.com/linux/13141.html
Ubuntu完美安装搭建Git服务器:http://www.linuxdiyf.com/linux/13045.html
搭建git服务器:http://www.linuxdiyf.com/linux/12685.html

个人操作

新增git用户角色

sudo useradd -m git
sudo passwd git

进入/home/git/

sudo git init –bare myrep.git

修改权限

sudo chown -R git:git /home/git/myrep.git
sudo chmod 755 -R /home/git/myrep.git/objects

另一台pc推代码测试

echo test >> testfile
git add testfile
git commit -m “testfile”
git push

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值