[CI Architect] gitolite3的安装与配置

本文将引导您完成Gitolite 3.3版本的安装与配置过程,包括SSH设置、Git安装及企业级CI环境下的代理服务器设置等关键步骤。通过实际操作实例,确保您的Git服务器能够高效稳定地运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

版本控制管理是持续集成(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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值