Ubuntu 12.04 – Installing Gitolite and Gitweb
来源:互联网 发布:blender软件下载 编辑:程序博客网 时间:2024/06/04 21:59
http://blog.countableset.ch/2012/04/29/ubuntu-12-dot-04-installing-gitolite-and-gitweb/
Note this is only tested on Ubuntu 12.04 Server with apache2, I'm sure it would work on the desktop version also.
Installing Git:
sudo apt-get install git-core
Optional, setup git global settings:
git config --global user.name "Your Name"git config --global user.email your@email.com
SSH Key:
Generate ssh public/private key on the machine you would like to access git repo from and copy it to the server into the /tmp/ directory, for reference here is the command:
ssh-keygen -t rsa -C "name@computer"
Installing Gitolite:
sudo apt-get install gitolite
Create a user to access gitolite with, in this case I chose git since I don't like to type:
sudo adduser \ --system \ --shell /bin/bash \ --gecos 'git version control' \ --group \ --disabled-password \ --home /home/git \ git
Now login to the newly created user, and set the path, and move to its home directory:
sudo su gitecho "PATH=$HOME/bin:$PATH" > ~/.bashrccd
Run the gitolite setup command with the public key you copied to the tmp directory to initialized the location for gitolite use. Then change the $REPO_UMASK to 0027 when it opens the .gitolite.rc for editing during the installation process. If it didn't open the file for any reason just open it up in vim (Note this is only if you'd like to use gitweb):
gl-setup /tmp/rachel.pub# change $REPO_UMASK = 0077; to $REPO_UMASK = 0027; # gets you 'rwxr-x---'
Afterward, it has made the gitolite-admin.git, testing.git repo and all other necessary files. Check to see that everything works by cloning the repo on the machine with the public/private key.
git clone git@<server>:gitolite-admin.git
Here is a resource about the syntax for the config file and adding users.
Install Gitweb:
This is the tricky bit... Install gitweb and the highlight app. Gitweb is located at '/usr/share/gitweb'
sudo apt-get install highlight gitweb
Edit the gitweb config to the locations of the project list and repos, and add the highlighting bit at the end of the file:
sudo vim /etc/gitweb.conf# change $projectroot to /home/git/repositories# change $projects_list to /home/git/projects.list# Add Highlighting at the end$feature{'highlight'}{'default'} = [1];
Change gitolite instance to allow access for gitweb. First append www-data to git group so gitweb can access the repos, then change the permissions for git repos and the projects list, finally restart apache:
sudo usermod -a -G git www-datasudo chmod g+r /home/git/projects.listsudo chmod -R g+rx /home/git/repositoriessudo service apache2 restart
Finally you need to tell gitolite which repo you want to show up in gitweb. To do this edit the gitolite.conf file from the gitolite-admin.git repo:
repo testing RW+ = @all R = gitweb
- Ubuntu 12.04 – Installing Gitolite and Gitweb
- Gitolite+Gitweb配置
- Gitosis and Gitweb – Part 3 – Gitweb
- Ubuntu 12.04 Gitolite 安装指南
- [转]Ubuntu 12.04 Gitolite 安装指南
- Installing and setting TFTPD in Ubuntu
- Installing swftools and pdf2swf on Ubuntu Linux
- Installing and setting TFTPD in Ubuntu
- Installing PHP and Zend Framework on Ubuntu
- Installing KVM and Open vSwitch on Ubuntu
- Installing Selenium and ChromeDriver on Ubuntu
- Ubuntu gitweb 安装配置
- ubuntu 14.10+gitweb配置
- Ubuntu14.04+gitolite+gitweb代码管理服务器搭建
- 利用apache2+gitolite+gitweb搭建git服务器的详细步骤
- Gitosis and Gitweb – Part 1 – Setup
- Installing webrtc2sip on Ubuntu 12.04
- Installing OrangeHRM On Ubuntu 12.04
- golang类型断言使用方法
- iOS开发——使用MBProgressHUD来增加用户体验(二)
- 天声人語 20151212 トランプ人気の懸念
- 日经春秋 20151212
- 读FUSE内核源代码
- Ubuntu 12.04 – Installing Gitolite and Gitweb
- Caffemodel解析
- 后台线程
- 《spring技术内幕》学习(二)ioc容器实现
- 第十五周项目二 (2)用哈希法组织关键字
- UML——活动图、状态图
- Android IntentService的使用与源码解析
- 第三章-循环语句
- 二叉搜索 方法