1 quick install+setup for experts
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:
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.
Notes:
~/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.生成yourname.pub方法,使用windows上的SecureCRT生成密钥对:
Tools->Create Public Key..->RSA->Passphrase(最好输入,也可为空)->长度默认1024->选择 OpenSSH Key format->选择位置保存。
2、在windows上访问linux上的git仓库
2.0 安装tortoisegit和git for windows
先安装: https://code.google.com/p/tortoisegit/wiki/Download 全部默认设置
再安装:http://msysgit.github.io/ 全部默认设置
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