gitolite 配置 在windows 下使用

gitolite 配置 在windows 下使用:

〇.安装gitolite:

参考:https://github.com/sitaramc/gitolite/

如网址不存在则googlegitolite

一.安装MSysGit:

http://code.google.com/p/msysgit/downloads/list

选择Git-1.7.4-preview20110204.exe或更高版本

安装的时候选中:

GitBashHere

GitGUIHere

测试安装:

git--version

gitconfig--list

配置MSysGit:

修改用户目录下的.gitconfig文件,添加以下几行:

[user]

name=yourname

email=yourmail@example.com

或使用命令行:

gitconfig--globaluser.name"yourname"

gitconfig--globaluser.email"yourmail@example.com"

配置颜色显示:

gitconfig--globalcolor.uitrue

生产密钥公钥对:

ssh-keygen-v-trsa-Cusername@hostname

ssh-keygen-trsa

把公钥重命名为yourname.pub

二.从gitolite服务器上clonegitolite-admin

把上面的公钥复制到复制到keydir下面,

修改conf/gitolite.conf添加相应用户:

@developer=youname

repotest_repo_name

RW+=@developer

把上面的修改push到服务器

三.安装SmartGit

下载地址(如不存在,请googlesmartgit):

http://www.syntevo.com/smartgit/index.html

安装完后,会提示让选择ssh的方式,

这里选择smartssh

在后面选择密钥的时候,选择上面第一步生成的密钥,如有设置密钥密码输入密码,然后点击选中storepasswordphase之类的

这样就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/

相关推荐