No description
Find a file
Claude 0c995f9a0a
feat: HTTP git push with API key auth
Replaces SSH as the primary git push path — no key generation needed.

  # Admin UI: Users → Generate key (shown once)
  git remote add hiy http://hiy:API_KEY@myserver/git/myapp
  git push hiy main

What was added:

- api_keys DB table (id, user_id, label, key_hash/SHA-256, created_at)
  Keys are stored as SHA-256 hashes; the plaintext is shown once on
  creation and never stored.

- routes/api_keys.rs
  GET/POST /api/users/:id/api-keys  — list / generate
  DELETE   /api/api-keys/:key_id    — revoke

- HTTP Smart Protocol endpoints (public, auth via Basic + API key)
    GET  /git/:app/info/refs        — ref advertisement
    POST /git/:app/git-receive-pack — receive pack, runs post-receive hook

  Authentication: HTTP Basic where the password is the API key.
  git prompts once and caches via the OS credential store.
  post-receive hook fires as normal and queues the build.

- Admin UI: API keys section per user with generate/revoke and a
  one-time reveal box showing the ready-to-use git remote command.

SSH path (git-shell + authorized_keys) is still functional for users
who prefer it; both paths feed the same build queue.

https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
2026-03-23 12:59:02 +00:00
builder Remove --memory limit to avoid memory.swap.max cgroup error on Pi 2026-03-22 15:23:49 +00:00
docs Add roadmap: Podman + git push deploy + self-hosted git 2026-03-20 14:46:14 +00:00
infra fix: auto-enable cgroup swap accounting on Pi before starting containers 2026-03-22 18:05:11 +00:00
proxy chore: gitignore generated proxy/caddy.json 2026-03-22 18:18:08 +00:00
scripts feat: git push deploy (roadmap step 2) 2026-03-23 08:54:55 +00:00
server feat: HTTP git push with API key auth 2026-03-23 12:59:02 +00:00
.dockerignore Add .dockerignore to drop build context from ~1.8 GB to a few KB 2026-03-22 10:13:53 +00:00
.env.example Add session-based auth to dashboard and API 2026-03-20 13:45:16 +00:00
.gitattributes Add .gitattributes: force LF line endings for shell scripts 2026-03-19 09:40:26 +00:00
.gitignore chore: gitignore generated proxy/caddy.json 2026-03-22 18:18:08 +00:00
Cargo.lock Update Cargo.lock for bcrypt dependency 2026-03-20 14:23:31 +00:00
Cargo.toml M1: Rust control plane, builder, dashboard, and infra 2026-03-19 08:25:59 +00:00
plan.md Add MVP plan for self-hosted Heroku clone on Raspberry Pi 2026-03-19 07:38:17 +00:00