git & gitolite 备忘

 == install git from source ==

1. 安装依赖:

 yum install perl-ExtUtils-MakeMaker perl-CPAN perl-Time-HiRes gettext-devel expat-devel curl-devel zlib-devel openssl-devel openssl-devel gcc-c++ make

2. 安装GIT

make prefix=/usr/local all

make prefix=/usr/local install

切记不能安装到其他自定义目录,要不gitolite会找不到路径:

WARNING: Can't exec "git": Permission denied at

 

== gitolit ==

1. git clone git://github.com/sitaramc/gitolite

2. adduser git -r -s /bin/bash -U -m

3. gitolite/install -to /usr/local/gitolite/bin

 

== add ssh ==

su git

ssh-keygen -f gitadmin (生成rsakey)

gitolite setup -pk gitadmin.pub

git clone git@host:gitolite-admin

你可能感兴趣的:(git)