aboutsummaryrefslogtreecommitdiff
path: root/templates/setup.html
diff options
context:
space:
mode:
authorLena <lena@omega>2026-08-01 00:00:00 +0000
committerLena <lena@omega>2026-08-01 00:00:00 +0000
commitbb6bc2387d58c737dbf92e73f8544bf39319dbd8 (patch)
tree6d5eaf5dac213074cd832da50f64260fce728fed /templates/setup.html
downloadgit-forge-master.tar.gz
Enter git-forgeHEADmaster
A small self-hosted git forge: HTTP push and pull, cgit browsing, local and OIDC accounts, TOTP, scoped push tokens, per-repo permissions, issues, a wiki, and outbound mail. It does not reimplement git. git-http-backend and cgit run as CGI behind its own listener, which authorises every request before exec'ing either. One binary, one data directory, one listener: no database, no JavaScript, and state is JSON in a git repo with a working tree.
Diffstat (limited to 'templates/setup.html')
-rw-r--r--templates/setup.html33
1 files changed, 33 insertions, 0 deletions
diff --git a/templates/setup.html b/templates/setup.html
new file mode 100644
index 0000000..9089bd3
--- /dev/null
+++ b/templates/setup.html
@@ -0,0 +1,33 @@
+{{define "title"}}Set up - {{.Site}}{{end}}
+{{define "main"}}
+<h2>Set up {{.Site}}</h2>
+<p>
+This creates the first account and gives it the global admin flag. The setup
+token was printed to the log when git-forge started, and this page is gone once
+an account exists.
+</p>
+<form method="post" action="/setup">
+<input type="hidden" name="csrf" value="{{.CSRF}}">
+<p>
+<label for="token">Setup token</label>
+<input id="token" name="token" required>
+</p>
+<p>
+<label for="name">Account name</label>
+<input id="name" name="name" autocomplete="username" autocapitalize="none" required>
+</p>
+<p>
+<label for="email">Email address, optional</label>
+<input id="email" name="email" type="email" autocomplete="email">
+</p>
+<p>
+<label for="password">Password</label>
+<input id="password" name="password" type="password" autocomplete="new-password" required>
+</p>
+<p>
+<label for="again">Password again</label>
+<input id="again" name="again" type="password" autocomplete="new-password" required>
+</p>
+<p><button type="submit">Create the first admin</button></p>
+</form>
+{{end}}