linux上安装gitolite和windows上安装tortoisegit及msysgit

1 quick install+setup for expertslinux

If your Unix-fu and ssh-fu are good, just copy your ssh public key (i.e., the ~/.ssh/id_rsa.pub file) from your workstation to the hosting user, then do something like this:git

su - git
mkdir -p ~/bin

git clone git://github.com/sitaramc/gitolite
gitolite/install -ln ~/bin          # please use absolute path here
gitolite setup -pk yourname.pub     # yourname.pub要先在git客户机上生成,复制到git服务器上,生成办法参见后面。

Please be sure to read any messages produced by these steps, especially the last one, to make sure things went OK.github

Notes:shell

  1. If your hosting user is not 'git', substitute accordingly.
  2. Make sure ~/bin is in $PATH. If it is not, add something to your shell startup files to make it so. If some other writable directory is in the path, you can use that if you like.
  3. Substitute your name for "yourname" :-)

生成yourname.pub方法,使用windows上的SecureCRT生成密钥对:windows

Tools->Create Public Key..->RSA->Passphrase(最好输入,也可为空)->长度默认1024->选择 OpenSSH Key format->选择位置保存。服务器

二、在windows上访问linux上的git仓库ssh

2.0 安装tortoisegit和git for windows工具

      先安装: https://code.google.com/p/tortoisegit/wiki/Download 所有默认设置ui

      再安装:http://msysgit.github.io/ 所有默认设置this

2.1 建立新的文件夹git-repos。

2.2 右键git-repos,选择git clone。

2.3 在弹出的对话框中填写内容,

      URL: git@ip:gitolite-admin

      Directory: D:\git-repos\gitolite-admin 

      Load Putty Key 选择私钥保存的位置 D:\zxp.ppk

      注意在第一步中生成的zxp zxp.pub没法直接使用,须要使用tortoisegit自带的附助工具Puttygen来进行转换成zxp.ppk再使用,

       打开Puttygen,先Load文件zxp(私钥),再选择Save private key存成zxp.ppk,这样便可。

2.4 肯定即将git服务器上的gitolite-admin下载到工做机上了。 

参考地址 https://github.com/sitaramc/gitolite#readme