summaryrefslogtreecommitdiff
path: root/git-server/sshd_config
diff options
context:
space:
mode:
authorArseney300 <Arseney300@gmail.com>2026-02-20 04:34:37 +0700
committerArseney300 <Arseney300@gmail.com>2026-02-20 04:34:37 +0700
commit4dc3214715b752c49a398b082aa2c961021ddd2d (patch)
tree261e3f2e834613d4bb8a614d939dd460dd2ccd7e /git-server/sshd_config
parentee7d961c638c3baa0ba12b0451fe5104fecc95a9 (diff)
Change git user home to /repos for shorter clone URLsgit-server/home-dir-change
- Set git user home directory to /repos via usermod -d so SCP-style clone URLs resolve relative to it: git clone git@server:test.git -> /repos/test.git - Set AuthorizedKeysFile to absolute path /home/git/.ssh/authorized_keys to keep SSH keys out of the repos volume - Update setup guide with new clone URL syntax Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'git-server/sshd_config')
-rw-r--r--git-server/sshd_config5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-server/sshd_config b/git-server/sshd_config
index 102169d..d982b37 100644
--- a/git-server/sshd_config
+++ b/git-server/sshd_config
@@ -51,8 +51,9 @@ PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
-AuthorizedKeysFile .ssh/authorized_keys
-#AuthorizedKeysFile /home/git/.ssh/authorized_keys
+# Absolute path because git user home is /repos (for shorter clone URLs),
+# but .ssh stays at /home/git/.ssh/ to keep it out of the repos volume
+AuthorizedKeysFile /home/git/.ssh/authorized_keys
#AuthorizedPrincipalsFile none