Commit 4a85d66f authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs/add-path-to-authorized_keys-file' into 'master'

Geo - Add path to authorized_keys file

See merge request gitlab-org/gitlab!62964
parents d9619329 becea8d1
...@@ -34,8 +34,15 @@ feature for CentOS 6, follow [the instructions on how to build and install a cus ...@@ -34,8 +34,15 @@ feature for CentOS 6, follow [the instructions on how to build and install a cus
## Fast lookup is required for Geo **(PREMIUM)** ## Fast lookup is required for Geo **(PREMIUM)**
By default, GitLab manages an `authorized_keys` file, which contains all the By default, GitLab manages an `authorized_keys` file that is located in the
public SSH keys for users allowed to access GitLab. However, to maintain a `git` user's home directory. For most installations, this will be located under
`/var/opt/gitlab/.ssh/authorized_keys`, but you can use the following command to locate the `authorized_keys` on your system.:
```shell
getent passwd git | cut -d: -f6 | awk '{print $1"/.ssh/authorized_keys"}'
```
The `authorized_keys` file contains all the public SSH keys for users allowed to access GitLab. However, to maintain a
single source of truth, [Geo](../geo/index.md) needs to be configured to perform SSH fingerprint single source of truth, [Geo](../geo/index.md) needs to be configured to perform SSH fingerprint
lookups via database lookup. lookups via database lookup.
...@@ -73,7 +80,7 @@ sudo service sshd reload ...@@ -73,7 +80,7 @@ sudo service sshd reload
``` ```
Confirm that SSH is working by commenting out your user's key in the `authorized_keys` Confirm that SSH is working by commenting out your user's key in the `authorized_keys`
(start the line with a `#` to comment it), and attempting to pull a repository. file (start the line with a `#` to comment it), and attempting to pull a repository.
A successful pull would mean that GitLab was able to find the key in the database, A successful pull would mean that GitLab was able to find the key in the database,
since it is not present in the file anymore. since it is not present in the file anymore.
......
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