Commit 9c8a4ff
Changed files (1)
forge.md
@@ -29,14 +29,16 @@ sudo chown -R git:git /opt/git
sudo adduser --system --shell /usr/bin/git-shell --group --home /opt/git git
sudo apt-get install -y git
sudo -u git mkdir -p /opt/git/.ssh /opt/git/backup
+sudo -u git chmod 700 /opt/git/.ssh
+sudo -u git touch /opt/git/.ssh/authorized_keys
+sudo -u git chmod 600 /opt/git/.ssh/authorized_keys
sudo -u git git config --global init.defaultBranch main
```
Update `/etc/ssh/sshd_config`
-```ssh_config
+```
Match User git
- ForceCommand /usr/bin/git-shell -c "$SSH_ORIGINAL_COMMAND"
AllowAgentForwarding no
PermitTTY no
X11Forwarding no