command="ls",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAurwDPkF1gw5Nf98BhBtPKLBEQ/AdiLIJUEreaa39aWGqzi5s4WBxBP3LMvdvqpMdbnj81ivklJTdlTbKuP4EkhVaXAtB0bw1m/oHPFpp2lH772Bj7ToZQc9omW0bqpP7CtRHCBlf10RIFnhB6ugHSETo4C/esL7OQPThHYvRd8lCGTFq9/4sVd1fWbTcreyXhQA669W+w//xNWla2KnO6+4i/P15SlZfvlgwkziaUHQRZXeVJ0toKuvQRjw5XI18Q3fORnlPALAL4ZV2vUA2Nh4wQGeEkMnXVKF92h+JrXG01filfvnPZZzSnIzVMEyA5ZHV1GhOFUzsogsBKhWrOw== gitprep@www7402u.sakura.ne.jp # gitolite start command="/home/git/gitolite/src/gitolite-shell yuku_t", no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3NzaC1y...== yuku_t # gitolite end ssh -p55555 -i ~/tmp/id_rsa_gitprep2 59.106.185.196 ssh -p55555 -i ~/tmp/id_rsa_gitprep2 git clone ssh://gitprep@59.106.185.196:55555/home/gitprep/labo/gitprep/data/rep/kimoto/gitprep_t.git ssh -p55555 -i ~/tmp/id_rsa_gitprep2 git-upload-pack gitprep_t.git ssh -p55555 59.106.185.196 git clone ssh://gitprep@59.106.185.196:55555/gitprep_t.git 環境変数 GIT_SSH ~/.ssh/config は大変便利ですが、 Git とは無関係の SSH 接続時にも参照されるので不都合なこともあります。別の方法として、 GIT_SSH 環境変数に SSH のラッパースクリプトを指定することができます。 git-ssh.sh #!/bin/sh exec ssh -oIdentityFile=~/.ssh/github_id_rsa "$@" $ GIT_SSH=git-ssh.sh git push git@github.com:kyanny/hello.git master