gitoliteメモ
- サーバ 
# su - gitolito
$ gl-setup 管理者用ssh公開鍵 
- クライアント
- 確認
$ git clone ssh://gitolite@gitserver.example.com/testing 
- ユーザの追加等
gitlite-admin リポジトリを clone
$ git clone ssh://gitolite@gitserver.example.com/gitolite-admin
conf/ 下を編集したり keydir/ 下に公開鍵を追加したりして commit 後 push 
- .ssh/id_rsa または .ssh/config に指定した秘密鍵以外の秘密鍵でアクセスしたいとき。
GIT_SSH に "ssh -i .ssh/id_rsa_2 などとすれば良いと思ったがこれだとダメ。
man git には以下のようにある。
   GIT_SSH
              :
    To pass options to the program that you want to list in GIT_SSH you will need to wrap
    the program and options into a shell script, then set GIT_SSH to refer to the shell
    script.
パスの通っているところに以下のようなスクリプトを作る(私の場合は 
~/bin/ssh-git-2) 。
    #!/bin/sh
    ssh -i /home/ryo/.ssh/id_rsa_nu  ${@+"$@"}
んで GIT_SSH=~/bin/ssh-git-2; export GIT_SSH  
  
あと、git push すると warning: push.default is unset; とかの
エラーがガーっと出るんだけど、ようわからんが以下で解決。
git config --global push.default simple
 
 
 
 
          
      
 
  
 
 
 
 
 
 
 
 
 
 
 
0 件のコメント:
コメントを投稿