[CI Architect] gitolite3的安装与配置

版本控制管理是持续集成(CI)中一个重要的环节。时下,最流行的SCM当属GIT。在GIT服务器中,gitolite是一个小巧而易用的服务器。相比github,它并不强大,但企业内部做CI,绝对胜任。

本文介绍gitolite最新版本3.3的安装和配置。

gitolite是perl开发的git server 地址为:https://github.com/sitaramc/gitolite。

GITolite服务器信息

主机名:meridians-gitolite

IP:192.168.0.140

系统:Ubuntu 12.10

另有一台客户端,这里是hanl@hanl-ubuntu1204

1.SSH设置

1.1.[server:meridians-gitolite]安装openssh-server

sudo apt-get install openssh-server

1.2.[client:hanl-ubuntu1204]测试连接

eric@meridians-jenkins-master:~$ ssh eric@192.168.0.140

The authenticity of host '192.168.0.140 (192.168.0.140)' can't be established.

ECDSA key fingerprint is e3:28:c5:b0:82:da:47:2f:34:30:bd:11:95:22:4f:4d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.0.140' (ECDSA) to the list of known hosts.

eric@192.168.0.140's password:

Welcome to Ubuntu 12.10 (GNU/Linux 3.5.0-17-generic x86_64)

* Documentation: https://help.ubuntu.com/

Last login: Sat Feb 2 05:43:10 2013 from 192.168.0.102

eric@meridians-gitolite:~$ exit

本文原创地址:http://feuyeux.iteye.com/blog/1797261

2.登录git server

hanl@hanl-ubuntu1204:~$ ssh eric@192.168.0.140

2.1.安装GIT

sudo apt-get install git

git config --global user.name "Eric Han"

git config --global user.email "feuyeux@gmail.com"

(2.2.GIT代理 如果企业内部设置了代理服务器,GIT使用的端口会被封杀,需要走代理)

2.2.1.安装

sudo apt-get install socat

2.2.2.创建socat脚本

cd /home/git

sudo nano git-proxy.sh

#!/bin/bash

socat STDIO PROXY:10.11.70.71:$1:$2,proxyport=80

sudo chmod 777 git-proxy.sh

2.2.3.配置git代理

sudo nano /etc/profile

export GIT_PROXY_COMMAND=/home/git/git-proxy.sh

source /etc/profile

原文地址:https://www.cnblogs.com/bjanzhuo/p/3576079.html