使用SSH搭建GIT服务器


使用SSH搭建GIT服务器

 

1.  服务器安装 git

yum install -y git

2.  新建工作组


mkdir /www
chmod 775 /www
useradd www
echo "\numask 0002\n" >> /home/www/.bash_profile

3.  新建用户


useradd -g www -s /usr/bin/git-shell user
echo "\numask 0002\n" >> /home/user/.bash_profile

4.  客户端

git clone ssh://user1@server/path_git