CentOS Git 服务器搭建

   Git    Git

安装git

1
yum -y install git

创建用户与授权

1
2
3
4
5
6
7
8
# 找到 git_shell 
whereis git_shell

/usr/bin/git-shell

# 创建 git 用户
adduser -d /var/git -s /usr/bin/git-shell git_*
passwd git_*

git 使用

1
2
3
4
5
6
7
cd /var/git

# 创建git仓库
git init --bare ***.git

# 授权
chmod -R 777 ***.git
  1. 安装git
  2. 创建用户与授权
  3. git 使用
Git 本地库提交至远程服务器
CentOS 搭建ftp服务器