From bb6bc2387d58c737dbf92e73f8544bf39319dbd8 Mon Sep 17 00:00:00 2001 From: Lena Date: Sat, 1 Aug 2026 00:00:00 +0000 Subject: Enter git-forge 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. --- templates/settings.html | 126 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 templates/settings.html (limited to 'templates/settings.html') diff --git a/templates/settings.html b/templates/settings.html new file mode 100644 index 0000000..8b2f0f1 --- /dev/null +++ b/templates/settings.html @@ -0,0 +1,126 @@ +{{define "title"}}Settings - {{.Site}}{{end}} +{{define "main"}} +

Account

+

+Signed in as {{template "who" .User}}{{if .Admin}}, a global admin{{end}}. +

+ +

Email and notifications

+{{if .MailOff}} +

+Mail is turned off on this instance, so nothing is sent. The address below is +still what commits made through the web are attributed to. +

+{{else}} +

+An address receives nothing until a link sent to it has been followed. Notices +about your own account ignore the toggle below, because they are security facts +rather than activity. +

+{{end}} +
+ +

+ + +{{if .Data.Email}}{{if not .Data.EmailConfirmed}}unconfirmed{{end}}{{end}} +

+

+ +

+

+
+ +{{if .Data.Local}} +

Change password

+
+ +

+ + +

+

+ + +

+

+ + +

+

+
+{{else}} +

Password

+

This account signs in through an external provider, so there is no password here.

+{{end}} + +

Push tokens

+

+Git over HTTP takes a token, never your password. A token is scoped to one +repository and carries the access you already have there: clone if you can read +it, push if you can write it, the wiki if you may edit it. It carries no second +factor, and it can be revoked on its own without touching anything else. +

+
git clone {{.Base}}/section/repo.git
+Username: {{.User}}
+Password: the token
+{{with .Data.Secret}} +
Token for {{$.User}}, shown once:
+
{{.}}
+{{end}} + + + + + +{{range .Data.Tokens}} + + + + + + + +{{else}} + +{{end}} +
IdRepositoryMadeLast used
{{.ID}}{{.Repo}}{{if .Created}}{{.Created}}{{else}}unknown{{end}}{{if .Used}}{{.Used}}{{else}}never{{end}} +
+ + + +
+
None. Mint one below to push over HTTP.
+

+Dates are days, not times: a write on every request git makes would be a write +on every request git makes. A token that has never been used, or was last used +a long time ago, is one worth revoking. +

+
+ +

+ + +

+

+
+ +

Authenticator

+

+Second factor. An account with the global admin +flag has to have one before it can administer anything. +

+ +

Sessions

+

+Signing out everywhere invalidates every session cookie ever issued for this +account, including this browser's. +

+
+ +

+
+{{end}} -- cgit v1.2.3