summaryrefslogtreecommitdiff
path: root/doc/ssh/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ssh/README.md')
-rw-r--r--doc/ssh/README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/ssh/README.md b/doc/ssh/README.md
index 1b53be15b44..9c4a391e8da 100644
--- a/doc/ssh/README.md
+++ b/doc/ssh/README.md
@@ -247,6 +247,17 @@ Public SSH keys need to be unique to GitLab, 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