Git Manual 1. server端安装Git
CentOS release 6.2 (Final)
Linux localhost 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 2011 x86_64 x86_64 x86_64 GNU/Linux
vi /etc/selinux/config
reboot
service iptables stop
chkconfig iptables off
rpm -Uvh mod_wsgi-3.3-7.1.x86_64.rpm
rpm -e git-1.7.1-2.el6_0.1.x86_64 perl-Git-1.7.1-2.el6_0.1.noarch
tar zxvf git-1.7.12.4.tar.gz
cd git-1.7.12.4
make clean
./configure --prefix=/usr
make;make install
git --version
2. 安装git-http-backend
略
3. 安装gitolite
cd
mkdir /var/www/gitolite-home
export GITOLITE_HTTP_HOME
GITOLITE_HTTP_HOME=/var/www/gitolite-home
PATH=$GITOLITE_HTTP_HOME/bin:$PATH
tar zxvf gitolite-2.3.1.tar.gz
cd gitolite-2.3.1/
GHH=$GITOLITE_HTTP_HOME
mkdir -p $GHH/bin $GHH/share/gitolite/conf $GHH/share/gitolite/hooks
src/gl-system-install $GHH/bin $GHH/share/gitolite/conf $GHH/share/gitolite/hooks
vi /var/www/gitolite-home/share/gitolite/conf/example.gitolite.rc
在文件开头增加
gl-setup sitaram
chown -R apache.apache $GITOLITE_HTTP_HOME
vi /etc/httpd/conf/httpd.conf
vi /etc/httpd/conf.d/gitolite.conf
mkdir -p /data/git.conf
touch /data/git.conf/passwd
htpasswd -b /data/git.conf/passwd sitaram 11111
htpasswd -b /data/git.conf/passwd test 11111
htpasswd -b /data/git.conf/passwd wangjian 11111
mv /var/www/gitolite-home/repositories/ /data/git/
ln -s /data/git/ /var/www/gitolite-home/repositories
service httpd configtest
service httpd start
cd /data
git clone http://sitaram:11111@127.0.0.1/git/gitolite-admin.git
cd gitolite-admin
vi conf/gitolite.conf
git commit -a -m "add admin"
git push
4. 测试
cd
git clone http://test:11111@127.0.0.1/git/testing.git
cd testing
touch readme
git add readme
git commit -m “first commit”
git push origin master
5. 建新库
cd /data/git/
cp -a testing.git test2.git
cd /data/gitolite-admin/
vi conf/gitolite.conf
git commit -a -m “add new repo”
git push
6. client端安装Git
linux
同上
windows
安装Git-1.8.3-preview20130601.exe
默认安装
安装TortoiseGit-1.8.3.0-32bit.msi
安装步骤到下图时选择”OpenSSH,Git default SSH Client”即可。其它步骤默认就行!
http://www./doc/git/gitolite.html
http://blog.csdn.net/gracioushe/archive/2010/09/29/5915352.aspx
http://surpass-li./blog/1052311
https://github.com/sitaramc/gitolite/blob/pu/doc/http-backend.mkd
http://www./pub/software/scm/git/docs/git-http-backend.html
http://kasunh./2011/01/15/git-over-https/
http:///questions/205207/ubuntu-git-git-http-backend-and-apache
http://www./blog/2009/05/06/8-ways-to-share-your-git-repository/#apachehttp
http:///2011/03/04/centos-git-http-push-unavailable-git-not-compiled-with-use_curl_multi/
http://fallenlord./logs/71511589.html
7. 安装ldap
vi /etc/httpd/conf.d/gitolite.conf
service httpd restart
http:///how-to-setup-git-http-authentication-using-ldap-in-apache/
8. 安装gitweb
由于gitolite不能基于路径/分支控制gitweb浏览的权限,对于要求严格权限的情况,就不要用gitweb了。 cd
cd git-1.7.12.4
make gitwebdir=/var/www/cgi-bin/gitweb install-gitweb
vi /var/www/cgi-bin/gitweb/gitweb_config.perl
vi /etc/httpd/conf.d/gitolite.conf
service httpd restart
http://www./index.php/2012/09/05/3477
http://blog.csdn.net/renyan20053295/article/details/7188312
http:///gitolite/g2/ggshb.html
https://github.com/git/git/blob/v1.7.6/Documentation/git-http-backend.txt
https://github.com/git/git/blob/v1.7.6/gitweb/README
https://github.com/sitaramc/gitolite/blob/v2.0.1/doc/http-backend.mkd
http://swarm./~razvan/blog/gitweb-access-to-git-repositories/
http://swarm./~razvan/blog/http-repository-sharing-asides-gitweb/
http://sethrobertson./HowToPutGitOnTheWeb/GitOnTheWeb.html
https://gist.github.com/karmi/484199
https://gist.github.com/iphoting?page=3
https://gist.github.com/iphoting/3102634
9. gitmanager
http://www.oschina.net/p/git+manager/similar_projects?lang=0&sort=time&p=13
http://labs./projects/gitmanager
|
|
来自: bananarlily > 《IT》