git+gitolite+cgit+apache on Ubuntu
git+gitolite+cgit+apache on Ubuntu
Just record, do *NOT* copy-paste.
git+gitolite
sudo apt-get install git openssh-server
sudo adduser git
su - git git clone git://github.com/sitaramc/gitolite
mkdir -p $HOME/bin
gitolite/install -to $HOME/bin
gitolite setup -pk YourName.pub git clone git@host:gitolite-admin
cgit+apache
sudo apt-get install libssl-dev apache2 curl -LOJ "http://git.zx2c4.com/cgit/snapshot/cgit-0.9.2.tar.xz"
tar xf cgit-0.9..tar.xz
cd cgit-0.9./
make get-git
make
sudo make install sudo a2enmod rewrite
/etc/apache2/sites-available/cgit
<VirtualHost *:>
ServerAdmin admin@example.com
ServerName git.example.com DocumentRoot /var/www/htdocs/cgit/ <Directory /var/www/htdocs/cgit/>
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory> Alias /cgit.png /var/www/htdocs/cgit/cgit.png
Alias /cgit.css /var/www/htdocs/cgit/cgit.css
ScriptAlias / "/var/www/htdocs/cgit/cgit.cgi/"
RewriteRule ^$ / [R]
RewriteRule ^/(.*)$ /cgit.cgi/$ [PT] ErrorLog /var/log/apache2/cgit-error.log # Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn CustomLog /var/log/apache2/cgit-access.log combined
</VirtualHost>
/etc/cgitrc
# Enable caching of up to 1000 output entriess
cache-size=1000 # cache time to live
cache-dynamic-ttl=5
cache-repo-ttl=5
cache-repo-ttl=5 # Specify some default clone urls using macro expansion
clone-url=http://e3200/$CGIT_REPO_URL git@e3200:$CGIT_REPO_URL # Specify the css url
css=/cgit.css # Show owner on index page
enable-index-owner=1 # Source gitweb.description, gitweb.owner from each project config
enable-git-config=1 # Allow http transport git clone
enable-git-clone=1 # Show extra links for each repository on the index page
enable-index-links=1 # Remove .git suffix from project display
remove-suffix=1 # Enable ASCII art commit history graph on the log pages
enable-commit-graph=1 # Show number of affected files per commit on the log pages
enable-log-filecount=1 # Show number of added/removed lines per commit on the log pages
enable-log-linecount=1 # Sort branches by date
branch-sort=age # Add a cgit favicon
favicon=/favicon.ico # Use a custom logo
logo=/cgit.png # Enable statistics per week, month and quarter
max-stats=quarter # Set the title and heading of the repository index page
root-title=e3200 Git repositories # Set a subheading for the repository index page
root-desc=tracking the foobar development # Include some more info about example.com on the index page
root-readme=/var/www/htdocs/cgit/about.htm # Allow download of tar.gz, tar.bz2 and zip-files
snapshots=tar.gz tar.bz2 zip ##
## List of common mimetypes
## mimetype.gif=image/gif
mimetype.html=text/html
mimetype.jpg=image/jpeg
mimetype.jpeg=image/jpeg
mimetype.pdf=application/pdf
mimetype.png=image/png
mimetype.svg=image/svg+xml # Highlight source code with python pygments-based highligher
source-filter=/usr/lib/cgit/filters/syntax-highlighting.sh # Format markdown, restructuredtext, manpages, text files, and html files
# through the right converters
about-filter=/usr/lib/cgit/filters/about-formatting.sh ##
## Search for these files in the root of the default branch of repositories
## for coming up with the about page:
##
readme=:README.md
readme=:readme.md
readme=:README.mkd
readme=:readme.mkd
readme=:README.rst
readme=:readme.rst
readme=:README.html
readme=:readme.html
readme=:README.htm
readme=:readme.htm
readme=:README.txt
readme=:readme.txt
readme=:README
readme=:readme
readme=:INSTALL.md
readme=:install.md
readme=:INSTALL.mkd
readme=:install.mkd
readme=:INSTALL.rst
readme=:install.rst
readme=:INSTALL.html
readme=:install.html
readme=:INSTALL.htm
readme=:install.htm
readme=:INSTALL.txt
readme=:install.txt
readme=:INSTALL
readme=:install ##
## List of repositories.
## PS: Any repositories listed when section is unset will not be
## displayed under a section heading
## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
## and included like this:
## include=/etc/cgitrepos
## project-list=/home/git/projects.list
scan-path=/home/git/repositories
/usr/lib/cgit/filters/syntax-highlighting.sh
sudo apt-get install highlight
exec highlight --force --inline-css -f -I -O xhtml -S "$EXTENSION" >/dev/null
Permission
sudo gpasswd -a www-data git
find /home/git/repositories -type d | xargs chmod g+rx
find /home/git/repositories -type f | xargs chmod g+r
chmod g+r /home/git/{projects.list,.gitolite.rc}
chmod g+rx /home/git/{repositories/,.gitolite/}
chmod g+r /home/git/
~/.gitolite.rc
$UMASK=0027
GIT_CONFIG_KEYS => '.*',
/usr/lib/cgit/filters/html-converters/resources/markdown.pl
## Disabled; causes problems under Perl 5.6.1:
# use utf8;
# binmode( STDOUT, ":utf8" ); # c.f.: http://acis.openlib.org/dev/perl-unicode-struggle.html
ref:
http://www.mahlerauto.com/setting-up-cgit-with-gitolite.html
http://blog.nas-admin.org/?p=39
https://wiki.archlinux.org/index.php/Cgit#Syntax_highlighting
http://easior.is-programmer.com/posts/40650.html
git+gitolite+cgit+apache on Ubuntu的更多相关文章
- GIT+Gitolite+Gerrit 环境搭建 ***
系统环境:Ubuntu12.04 服务器上安装git+gitolite+gitweb root@server: 为搭建git服务器终端,假设ID为 192.168.199.117 或域名为: http ...
- [置顶] 【Git入门之十三】Ubuntu和git
原创作品,转载请标明:http://blog.csdn.net/jackystudio/article/details/12374291 之前我们都是在Windows平台下操作git.现在我们改用Ub ...
- 配置 AEM CQ6 (author + publish + apache dispatcher + ubuntu )
AEM CQ系列是Adobe下的企业内容管理系统,现在已知的一些企业比如 Deloitte,Ford Racing,这里就不多做基本的介绍了,明白的看! 今天在Docker配置一下author i ...
- centos git gitolite安装笔记
export PATH=/home/git/bin:$PATH echo PATHgit branch 查看本地分支 git branch -a 查看远程分支 git fetch 获取远程分支 git ...
- centos+git+gitolite 安装和部署
一.部署环境 系统:CentOS 6.4x64 最小化安装 IP:192.168.52.131 git默认使用SSH协议,在服务器上基本上不用怎么配置就能直接使用.但是如果面向团队服务,需要控制权限的 ...
- git+gitolite如何实现权限控制
前言 首先说明一下,这还是本人第一次写这类文章,如有不妥,多多见谅. 基本情况 因为现在公司的人不是很多,但是还对代码有着严格的管控,所以采用了gitolite的管理方式 其实正常来讲,这种权限的把控 ...
- Git版本库的创建(Ubuntu)
在Ubuntu上学习Git随笔. 一. git 仓库的安装 git 在终端用git命令查看Ubuntu是否安装git版本库,如果没有安装,最新版本(Ubuntu18.04)会提示用下面命令进行安装. ...
- activate mod_rewrite How To Set Up mod_rewrite for Apache on Ubuntu 14.04 Apache Rewrite url重定向功能的简单配置
https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite-for-apache-on-ubuntu-14-0 ...
- Ubuntu server 搭建Git server
Ubuntu server 搭建Git server,git相比svn,最主要就是分布式了,每个客户端用户的本地都是一个版本管理控制器. Ubuntu server 版本为12.04 搭建步骤如下: ...
随机推荐
- (通用)Android App代码混淆终极解决方案【转】
App虽然没有那么的高大上,但是代码的混淆是代表了程序员对App的责任心, 也是对App安全的一点点保证.今天我会将自己做Android混淆的过程和体会分享给大家,也避免大家少走弯路,少跳坑. 本篇博 ...
- Sword pcre库函数学习三
14.pcre_get_substring_list 原型: #include <pcre.h> int pcre_get_substring_list(const char *subje ...
- 原创:如何实现在Excel通过循环语句设置指定行的格式
原创:如何实现在Excel通过循环语句设置指定行的格式 一.需求: 想让excel的某些行(比如3的倍数的行)字体变成5号字 如何整: 二.实现: Sub code() To Range(" ...
- 关于Python的装饰器 decorator
装饰器的原理:其实就是高阶函数,接收原函数以在之前之后进行操作. 语法格式是固定的:先定义一个函数,再使用@语法调用该函数. 例子一: import functools # 定义装饰器,固定格式 de ...
- 解密QQ——队列
一.问题引入 小明和小丽同在一个自习室上自习,小明感觉小丽是一个很不错的女孩,于是他鼓足勇气向小丽要QQ号,然而小丽也是个矜持的女孩,当然不会直接告诉他,所以小丽给了小明一串加密过的数字,同时她也告诉 ...
- vi 打开文件,行末尾有^M
原因: Windows下的文本文件的每一行结尾,都有一个回车符('\n')和一个换行符('\r') Linux下的文本文件的每一行结尾,只有一个回车符('\n') Mac下的文本文件的每一行结尾,只有 ...
- UnityEditor--------------之Selection类的变量解析
UnityEditor的Selection类 Unity官方文档:https://docs.unity3d.com/ScriptReference/Selection.html Selection S ...
- ubuntu -- 不输入密码执行sudo
作为ubuntu等桌面系统,默认登录的帐号是没有root权限的,为了提升权限来执行任务,我们一般用到 "sudo+命令" 来执行,但是不难发现我们 一般都要输入密码.那么有没有什么 ...
- 启动其他APK的Activity方法 (转至http://www.cnblogs.com/lijunamneg/archive/2013/02/26/2934060.html)
有两个app,分别叫做App1和App2.App1包含两个Activity,分别叫做App1_A和App1_B.其中App1_A是入口Activity.也就是App1_A设置intent-filter ...
- Js正则校验身份证号码
原文链接:http://gongwen.sinaapp.com/article-126-cmd 这个其实不难,在网上多找一下总会有意外收获的.但是工欲善其事,必先利其器.我们需要了解一下身份证号的规则 ...