gitmote

gitmote  ·  history  ·  branches

chore: default the bootstrap admin handle to "admin" in dev/e2e scripts

468519d6b69e51c6000c0e2871d4a4c59daabb3f
Atanas Minev <atmin@protonmail.com> · 2026-07-05 21:47

diff --git a/docs/ops.md b/docs/ops.md
index 4803164..f16aabf 100644
--- a/docs/ops.md
+++ b/docs/ops.md
@@ -237,8 +237,8 @@ scw container container create \
# own cert and browsers report "not secure"):
scw container domain create container-id=<CONTAINER_ID> hostname=gitmote.atmin.net
scw container domain list container-id=<CONTAINER_ID> # status pending → ready (minutes)
-# Note: gitmote has no route at "/", so http(s)://gitmote.atmin.net/ returns 404
-# by design; check /healthz for liveness. Git lives under /<repo>/….
+# Note: "/" is the web dashboard (200); for a plain liveness probe use
+# /healthz. Git lives under /<repo>/….
# 5. CI runner Serverless Job — point its definition at the public GHCR runner
# image (one image serves all repos; per-job env is injected at trigger). Set
@@ -283,11 +283,11 @@ export GITMOTE_S3_BUCKET=gitmote \
AWS_REGION=fr-par AWS_ACCESS_KEY_ID=<KEY> AWS_SECRET_ACCESS_KEY=<SECRET>
# Bootstrap by hand (optional -repo). Idempotent — refuses to clobber an admin:
-gitmote bootstrap -handle atmin
+gitmote bootstrap -handle admin
# Lost the token? Mint a fresh one for the existing admin (safe: whoever can run
# this against the bucket already has total infra control):
-gitmote bootstrap -reissue -handle atmin
+gitmote bootstrap -reissue -handle admin
```
Each prints the access token once (save it) and durably flushes the new state to
@@ -316,8 +316,8 @@ git push origin master
```bash
# Push the gitmote repo over HTTPS to the deployed instance:
-git push https://atmin:<token>@gitmote.atmin.net/gitmote HEAD:refs/heads/master
-git clone https://atmin:<token>@gitmote.atmin.net/gitmote /tmp/gitmote-clone
+git push https://admin:<token>@gitmote.atmin.net/gitmote HEAD:refs/heads/master
+git clone https://admin:<token>@gitmote.atmin.net/gitmote /tmp/gitmote-clone
git -C /tmp/gitmote-clone fsck --full # clean
```
diff --git a/scripts/dev.sh b/scripts/dev.sh
index 55e5d15..7f2c220 100755
--- a/scripts/dev.sh
+++ b/scripts/dev.sh
@@ -58,8 +58,8 @@ echo "--- starting MinIO (S3 :9100, console :9101) ---"
# server also auto-bootstraps on a truly empty bucket — this just makes the token
# and the dev repo available up front). 'make dev-reset' wipes the DB to start over.
echo "--- ensuring admin + dev repo (idempotent) ---"
-bin/gitmote bootstrap -handle atmin -repo gitmote -default-branch master >/dev/null
-TOKEN="$(bin/gitmote bootstrap -reissue -handle atmin | grep -oE 'gmt_[0-9a-f]+\.[0-9a-f]+' | head -1)"
+bin/gitmote bootstrap -handle admin -repo gitmote -default-branch master >/dev/null
+TOKEN="$(bin/gitmote bootstrap -reissue -handle admin | grep -oE 'gmt_[0-9a-f]+\.[0-9a-f]+' | head -1)"
[ -n "$TOKEN" ] || { echo "ERROR: no token from 'bootstrap -reissue'" >&2; exit 1; }
cat <<EOF
@@ -68,8 +68,8 @@ cat <<EOF
UI: http://localhost:8080/ (sign in at /login by pasting the token)
token: $TOKEN
- clone: git clone http://atmin:$TOKEN@localhost:8080/gitmote
- push: git push http://atmin:$TOKEN@localhost:8080/gitmote HEAD:refs/heads/master
+ clone: git clone http://admin:$TOKEN@localhost:8080/gitmote
+ push: git push http://admin:$TOKEN@localhost:8080/gitmote HEAD:refs/heads/master
MinIO console: http://localhost:9101 (minioadmin / minioadmin)
Ctrl-C stops the server; MinIO keeps running. 'make dev-reset' wipes all state.
diff --git a/scripts/e2e-local.sh b/scripts/e2e-local.sh
index 5de6252..cea7bd6 100755
--- a/scripts/e2e-local.sh
+++ b/scripts/e2e-local.sh
@@ -68,11 +68,11 @@ $DC up -d minio
$DC run --rm mc
echo "--- bootstrap (one-shot, writes admin/token/repo to the metadata volume) ---"
-BOOT="$($DC run --rm -T gitmote bootstrap -handle atmin -repo gitmote -default-branch "$BRANCH")"
+BOOT="$($DC run --rm -T gitmote bootstrap -handle admin -repo gitmote -default-branch "$BRANCH")"
TOKEN="$(printf '%s\n' "$BOOT" | grep -oE 'gmt_[0-9a-f]+\.[0-9a-f]+' | head -1)"
[ -n "$TOKEN" ] || { printf '%s\n' "$BOOT"; fail "no token in bootstrap output"; }
-REPO_URL="http://atmin:${TOKEN}@localhost:8080/gitmote"
+REPO_URL="http://admin:${TOKEN}@localhost:8080/gitmote"
echo "--- starting gitmote server ---"
$DC up -d gitmote
diff --git a/scripts/e2e-restore.sh b/scripts/e2e-restore.sh
index 9ab0b1b..e06a02f 100755
--- a/scripts/e2e-restore.sh
+++ b/scripts/e2e-restore.sh
@@ -47,10 +47,10 @@ $DC up -d minio
$DC run --rm mc
echo "--- bootstrap (replicates initial metadata to S3) ---"
-BOOT="$($DC run --rm -T gitmote bootstrap -handle atmin -repo gitmote -default-branch "$BRANCH")"
+BOOT="$($DC run --rm -T gitmote bootstrap -handle admin -repo gitmote -default-branch "$BRANCH")"
TOKEN="$(printf '%s\n' "$BOOT" | grep -oE 'gmt_[0-9a-f]+\.[0-9a-f]+' | head -1)"
[ -n "$TOKEN" ] || { printf '%s\n' "$BOOT"; fail "no token in bootstrap output"; }
-REPO_URL="http://atmin:${TOKEN}@localhost:8080/gitmote"
+REPO_URL="http://admin:${TOKEN}@localhost:8080/gitmote"
echo "--- start server + push ($BRANCH @ $PUSHED) ---"
$DC up -d gitmote