# tea setup & login recovery

## Install (checksum-verified, no root needed)

```bash
# version tag from: curl -sS https://gitea.com/api/v1/repos/gitea/tea/releases/latest
VER=0.16.0                       # tag is v0.16.0; asset name drops the leading v
BIN=tea-${VER}-linux-amd64
mkdir -p ~/.local/bin
cd "$TMPDIR"                     # scratch dir — never /tmp on this host
curl -sSL -o "$BIN" "https://gitea.com/gitea/tea/releases/download/v$VER/$BIN"
curl -sSL -o tea-checksums.txt "https://gitea.com/gitea/tea/releases/download/v$VER/checksums.txt"
grep " $BIN\$" tea-checksums.txt | sha256sum -c -
install -m 755 "$BIN" ~/.local/bin/tea
```

PATH wiring (no root; `/usr/local/bin` not writable): add
`export PATH="$HOME/.local/bin:$PATH"` to **both** `~/.bashrc` and `~/.profile` (shell start mode varies), verify with `bash -c 'command -v tea && tea --version'`.

## Login

```bash
tea login add --name schroll-it --url https://git.cloud.schroll-it.de --token <token> --git-credentials --nv
```

- Token source: Basti (Settings → Applications on the server); account `Hermes` (Bot).
- Do NOT pass `--user` alongside `--token` (triggers the basic-auth path → `no password set`).
- Set default if needed: `tea login default schroll-it`.
- Sanity check: `tea login status`, then `tea repos`.

## git credentials fallback

tea's helper covers HTTPS git; `~/.git-credentials` (chmod 600) + `git config --global credential.helper store` is the belt-and-braces path for tools that bypass tea.
