# nugiteaWORK IN PROGRESSA very very minimal Gitea. No users, no roles, no login, no web UI — just aserver that can clone, push, and mirror git repos, implemented by shellingout to `git` the same way Gitea itself does (verified against Gitea's actualsource: `routers/web/repo/githttp.go`, `modules/ssh/ssh.go`, `cmd/serv.go`,`modules/gitrepo/hooks.go`, `services/mirror/`).## What it does- **Smart-HTTP** clone/push (`git clone http://host:3080/name.git`) via`git upload-pack`/`git receive-pack --stateless-rpc`, same as Gitea's`POST /info/refs`, `/git-upload-pack`, `/git-receive-pack` endpoints.- **SSH** clone/push (`git clone ssh://host:2222/name.git`) via a built-inSSH server that execs the same git subcommands directly against thesession, mirroring Gitea's `modules/ssh` + `cmd/serv.go`.- **Git hooks**: bare repos get `pre-receive`/`update`/`post-receive`delegator scripts that call back into `nugitea hook <name>`, mirroringGitea's hook delegation — currently a no-op stub (no protected branches,no webhooks), a landing spot for future policy.- **Pull mirrors**: periodically `git fetch --prune --tags` from a configuredremote into a local bare repo.- **Push mirrors**: periodically `git push --mirror -f` a local bare repo toa configured remote.## What it doesn't doEverything else: no users, no authentication, no web UI, no issues/PRs, nowebhooks, no LFS, no protected branches, no dumb-HTTP fallback, no AGit. Allrepos are fully open to clone and push. See `internal/auth` for the seamwhere real access control could be added later without touching the HTTP orSSH transport code.## Usage```shgo build -o nugitea ./cmd/nugitea# Start the server (repos live under ./data by default)./nugitea serve --http :3080 --ssh :2222 --repo-root ./data# In another terminal:./nugitea repo create demogit clone http://localhost:3080/demo.gitgit clone ssh://localhost:2222/demo.git # port 2222 must be reachable as your ssh client's target# Mirroring (flags must come before the positional args)./nugitea mirror add-pull --interval 5m demo https://example.com/some/repo.git./nugitea mirror add-push --interval 5m demo git@example.com:backup/demo.git````NUGITEA_REPO_ROOT` sets the repo root for the `repo`/`mirror` subcommandswhen not passed `--repo-root` (only `serve` takes that flag directly; theother subcommands assume they're run against the same root as a runningserver).## Layout```cmd/nugitea/ CLI entry point (serve, repo, mirror, hook subcommands)internal/gitcmd/ git subprocess builder (Gitea's modules/git/gitcmd, trimmed)internal/repo/ bare-repo layout, git init --bare, hook installationinternal/httpgit/ smart-HTTP protocol handlerinternal/sshgit/ SSH serverinternal/mirror/ pull/push mirror config + periodic schedulerinternal/auth/ access-control seam (AllowAll today)```