日期:2014-05-17  浏览次数:21024 次

gitolite 配置 在windows 下使用

gitolite 配置 在windows 下使用:

〇. 安装 gitolite :
参考: https://github.com/sitaramc/gitolite/
如网址不存在 则 google gitolite

一. 安装 MSysGit :
http://code.google.com/p/msysgit/downloads/list
选择 Git-1.7.4-preview20110204.exe 或更高版本
安装的时候 选中:
??? Git Bash Here
??? Git GUI Here

测试安装:
git --version
git config --list

配置 MSysGit:
修改 用户目录下的 .gitconfig 文件,添加以下几行:
[user]
name = your name

email = yourmail@example.com

或使用命令行:
git config --global user.name "your name"

git config --global user.email "yourmail@example.com"

配置颜色显示:
git config --global color.ui true

生产密钥 公钥对:
ssh-keygen -v -t rsa -C username@hostname

ssh-keygen -t rsa
把公钥重命名为 yourname.pub

二. 从gitolite 服务器上 clone gitolite-admin
把上面的公钥复制到 复制到 keydir 下面,
修改 conf/gitolite.conf 添加相应用户:
@developer = youname
repo test_repo_name
??? RW+ = @developer
???
把上面的修改push到服务器


三. 安装 SmartGit
下载地址 (如不存在,请google smartgit):
http://www.syntevo.com/smartgit/index.html

安装完后,会提示 让选择 ssh 的方式,
这里选择 smart ssh
在后面选择 密钥的时候,选择上面第一步生成的密钥,如有设置密钥密码输入密码,然后点击 选中 store password phase 之类的

这样就 ok了

注: 密钥对在哪里生成无所谓,但只要是一对就行了

参考网址: http://www.mmncs.com/2011/06/how-to-install-and-setup-git-on-windows-7-using-either-msysgit-or-cygwin/

http://www.mmncs.com/2011/06/how-to-install-and-setup-a-git-repository-server-using-gitolite-on-linux-ubuntu-with-windows-clients-using-msysgit/