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

相關文章
相關標籤/搜索