Skip to content

Commit 07a2bc6

Browse files
committed
gitea: fix git-over-SSH auth, group-writable home dir tripped sshd StrictModes
1 parent c1929dc commit 07a2bc6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

install/gitea-install.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ setup_deb_based() {
3030
chown -R gitea:gitea /var/lib/gitea/
3131
chmod -R 750 /var/lib/gitea/
3232
chown root:gitea /etc/gitea
33-
chmod 770 /etc/gitea
33+
# sshd's StrictModes rejects pubkey auth if authorized_keys or any parent dir up to
34+
# $HOME is group-writable - 770 here silently broke git-over-SSH (falls back to
35+
# password auth, which fails since the gitea user has no password).
36+
chmod 750 /etc/gitea
3437
sudo -u gitea ln -s /var/lib/gitea/data/.ssh/ /etc/gitea/.ssh
3538
msg_ok "Configured Gitea"
3639

0 commit comments

Comments
 (0)