Commit 3eb80062 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs-use-specific-ssh-key-in-git-repo' into 'master'

Explain how to use a specific identity in a repo

See merge request gitlab-org/gitlab-ee!5864
parents b940147c 778d2045
......@@ -166,6 +166,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