Commit 778d2045 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Update doc/ssh/README.md

parent de45ba49
......@@ -151,15 +151,6 @@ Host gitlab.company.com
RSAAuthentication yes
IdentityFile ~/.ssh/config/private-key-filename
```
If you want to use different keys depending on the repository you are working
on, you can issue the following command while inside your repository:
```
git config core.sshCommand "ssh -o IdentitiesOnly=yes -i ~/.ssh/private-key-filename-for-this-repository -F /dev/null"
```
Please note that such a configuration will not use the SSH Agent and requires
at least Git 2.10.
Due to the wide variety of SSH clients and their very large number of
configuration options, further explanation of these topics is beyond the scope
......@@ -169,6 +160,17 @@ Public SSH keys need to be unique, as they will bind to your account.
Your SSH key is the only identifier you'll have when pushing code via SSH.
That's why it needs to uniquely map to a single user.
## Per-repository SSH keys
If you want to use different keys depending on the repository you are working
on, you can issue the following command while inside your repository:
```sh
git config core.sshCommand "ssh -o IdentitiesOnly=yes -i ~/.ssh/private-key-filename-for-this-repository -F /dev/null"
```
This will not use the SSH Agent and requires at least Git 2.10.
## Deploy keys
### Per-repository deploy keys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment