gitlb的两种方式搭建
yum安装搭建
#centos安装
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
yum install git
#ubuntu安装
apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
apt-get install git
#创建用户
groupadd git
useradd git -g git
#证书登录
cd /home/git/
mkdir .ssh
chmod 755 .ssh
touch .ssh/authorized_keys
chmod 644 .ssh/authorized_keys
#初始化仓库
cd /home
mkdir test
chown git:git test/
cd test
git init --bare test.git
Initialized empty Git repository in /home/test/test.git/
chown -R git:git test.git
#克隆仓库
git clone git@172.16.0.1:/home/test/test.git
Cloning into 'test'...
warning: You appear to have cloned an empty repository.
Checking connectivity... done.