Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
git-deploy-keys-setup/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
21 lines (19 sloc)
741 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git-deploy-keys-setup | |
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 on `github.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 !) | |
# idea behind it | |
- 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` |