Quantcast
Channel: Development life » System
Viewing all articles
Browse latest Browse all 2

Centos 5.8 install your own git server

$
0
0

Install dependencies

yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel

Install from source

wget https://git-core.googlecode.com/files/git-1.7.11.1.tar.gz
tar -xzvf git-1.7.11.1.tar.gz 
cd git-1.7.11.1
./configure 
make
make install

Check install:

git --version

Create new Test repo:

useradd git
cd /home/git
mkdir test-repo
cd test-repo
git init
cd ../
git clone --bare ./test-repo/ test-repo.git

Add your public key to authorize

cd /home/git
mkdir .ssh
touch .ssh/authorized_keys
# import your public key into authorized_keys
chown -R git.git ./*

Now you can clone your test-repo and then pull, push

git link: git@server_ip:test-repo.git

Viewing all articles
Browse latest Browse all 2

Trending Articles