How to create different deploy keys for seperate repositories
- generate a ssh key-pair
ssh-keygen -f /home/wwwutz/.ssh/blabla_rsa
- add
/home/wwwutz/.ssh/blabla_rsa.pub
as a deploy key to repository blabla ongithub.molgen.mpg.de
- edit
~/.ssh/config
Host blabla.github.molgen.mpg.de
HostName github.molgen.mpg.de
User git
IdentityFile /home/wwwutz/.ssh/blabla_rsa
IdentitiesOnly yes
- when cloning the repo use
git clone git@blabla.github.molgen.mpg.de:wwwutz/foobar.git
(! hostname !)
- use an individual ssh key per repository
- ssh to a different 'host'
- let ssh use the real host redirected by
.ssh/config
- use the individual key as configured
.ssh/config