Getting Started

Create an account, get a token, create a repo, push, and clone.

1) Set your DATA_DIR (local dev)

export GAITHUB_DATA_DIR="$HOME/gaithub_data"
mkdir -p "$GAITHUB_DATA_DIR/users" "$GAITHUB_DATA_DIR/repos"
Cloud Run will use /var/lib/gaithub (mounted volume) or a configured path.

2) Register a user

curl -s -X POST https://gait-hub.com/auth/register \
  -H "Content-Type: application/json" \
  -d '{"username":"alice"}' | jq

3) Issue a token (shown once)

ALICE_TOKEN=$(curl -s -X POST https://gait-hub.com/auth/token \
  -H "Content-Type: application/json" \
  -d '{"username":"alice"}' | jq -r .token)

echo "$ALICE_TOKEN"
Save it somewhere safe. The server stores only a hash.

4) Create a repo (as that user)

curl -s -X POST https://gait-hub.com/repos/alice/myrepo \
  -H "Authorization: Bearer $ALICE_TOKEN" | jq

5) Clone (open reads by default)

gait clone https://gait-hub.com --owner alice --repo myrepo --path ./myrepo

6) Browse the Web UI

Next

Use the Web Console to register users, issue tokens, create repos, fork, and manage PRs.
Open Web Console