Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All
order allow,deny
Allow from all
AddHandler cgi-script cgi
DirectoryIndex gitweb.cgi
4.赋予权限,很重要:chgrp -R www-data /home/repo chmod a+r repo
chmod a+x repo
mv hooks/post-update.sample hooks/post-update5.a2ensite gitserver 6./etc/init.d/apache2 restart
匿名访问方式: git clone
http://192.168.1.1/alsa-lib.git git clone http://192.168.1.1/alsa-utils.git
git访问方式:
git clone git@192.168.1.1:alsa-lib.git
Web网页浏览:
http://192.168.1.1
遇到的问题: 1.windows文件命名不区分大小 写,而linux支持。这样android源码下载时会出现一下问题。大约有15个文件存在这个问题。
2.库的描述文件在.git文件夹的description文件中。编辑该文件,在gitweb页中就会有 description。
3.gitosis库hooks下的post- update不是由post-update.sample重命名过来的,它们不一样。post-update可以更新工作目录,保持与库一致。没有它配置 文件是不会更新的。
4.(1)git@hello:/home/git$ git add .
error: readlink(“external/openssl/apps/md4.c”): No such file or directory
error: unable to index file external/openssl/apps/md4.c
fatal: adding files failed
(2)root@/external/openssl# git init Initialized empty Git repository in /external/openssl/.git/
root@/external/openssl# git add . error: readlink(“apps/md4.c”): No such file or directory
error: unable to index file apps/md4.c
fatal: adding files failed
(3)
root@android-2.1_r2$rm -Rf .reporoot@android-2.1_r2$find . -name “.git” | xargs rm -Rf