Commit 9526e98

bryfry <bryon@fryer.io>
2025-09-27 15:48:32
init
Changed files (1)
forge.md
@@ -0,0 +1,39 @@
+## New Repo Setup
+
+```bash
+sudo -u git git init --bare /opt/git/repos/{{path}}/{{repo}}.git
+```
+
+```bash
+git add remote origin forge:{{path}}/{{repo}}.git
+```
+
+## Backups
+
+```bash
+sudo -u git \
+    tar \
+        --create \
+        --zstd \
+        --directory /opt/git/ \
+        --file /opt/git/backup/$(date -Is)_forge.tar.zst \
+        --exclude-dir backup \
+        .
+```
+
+## Server Setup
+
+```bash
+sudo mkdir -p /opt/git
+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 git config --global init.defaultBranch main
+```
+
+Remaining setup work
+- Setup authorized keys
+- Extract backup repos and/or upate repo dirs
+
+