A CLI-first git forge. cli forge git self-hosted

https://gitbay.org

Commit af6988e4c0

af6988e4c09c713d189b0c122d10786bf89afd85

parent: e0fcc7c7b1

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-19 04:29 UTC

web, control, e2e: name the web path after registration

The registered page and the verification mail told a newcomer only the
SSH activation command. Both now also say: sign in with the emailed
link, paste the code under Settings, then + creates a repository.

Ref #226
e2e/registration_test.go +3
@@ -143,6 +143,9 @@ func TestOpenRegistration(t *testing.T) {
143143 if !strings.Contains(msg, "To: dana@example.test") || !strings.Contains(msg, "From: noreply@gitbay.test") {
144144 t.Fatalf("mail headers:\n%s", msg)
145145 }
146 if !strings.Contains(msg, "/login") {
147 t.Fatalf("mail missing web sign-in path:\n%s", msg)
148 }
146149
147150 // Pending: the key authenticates, whoami works, but everything else is
148151 // gated — control commands and git alike.
e2e/websignup_test.go +2 −1
@@ -54,7 +54,8 @@ func TestWebSignup(t *testing.T) {
5454 // The real thing: account is active immediately (invite proves the mailbox).
5555 status, body = browserPost(t, browser, inst.base()+"/register", url.Values{
5656 "username": {"erin"}, "invite": {inviteCode}, "key": {string(pub)}})
57 if status != 200 || !strings.Contains(body, "welcome, erin") {
57 if status != 200 || !strings.Contains(body, "welcome, erin") ||
58 !strings.Contains(body, `href="/settings"`) || !strings.Contains(body, "paste the code") {
5859 t.Fatalf("signup: %d\n%s", status, body)
5960 }
6061 out, errOut, code := inst.ssh(t, key, "", "whoami")
internal/control/register.go +2 −1
@@ -127,8 +127,9 @@ func sendVerification(cfg config.Config, st *store.Store, userID int64, address
127127 body := fmt.Sprintf(
128128 "Someone (hopefully you) added this address to an account on %s.\n\n"+
129129 "To verify it, run:\n\n ssh git@%s email verify %s\n\n"+
130 "Or sign in at https://%s/login with this address and paste the code under Settings.\n\n"+
130131 "The code expires in 24 hours. If this wasn't you, ignore this mail.\n",
131 siteHost(cfg), siteHost(cfg), code)
132 siteHost(cfg), siteHost(cfg), code, siteHost(cfg))
132133 return mail.Send(cfg, address, "verify your email on "+siteHost(cfg), body)
133134}
134135
internal/web/templates/registered.html +5 −1
@@ -4,7 +4,11 @@
44<div class="landing">
55<h1>Welcome, {{.Username}}</h1>
66<pre class="quickstart">{{.Message}}</pre>
7<p>Everything runs over SSH with the key you registered:</p>
7<h2>On the web</h2>
8<p>Check your mail for the code, <a href="/login">sign in</a> with an emailed
9link, and paste the code under <a href="/settings">Settings</a>. Then +
10creates your first repository.</p>
11<h2>From the terminal</h2>
812<pre class="quickstart">ssh git@{{.Host}} whoami
913ssh git@{{.Host}} repo create {{.Username}}/hello
1014gitbay web login # mints a browser session from your terminal</pre>