---
name: gitea-work
description: Use when working with Basti's Gitea server via the tea CLI.
version: 0.1.0
author: Hermes
license: MIT
metadata:
  hermes:
    tags: [gitea, tea, git, code-review, issues, pulls]
    related_skills: []
---

# Gitea work via tea

## When to Use

Any task touching Basti's private Gitea (`git.cloud.schroll-it.de`): listing or filing issues, reviewing/creating pull requests, browsing repos, any Schroll-IT org interaction — plus first-time tea setup or login repair.

## Always-on rules

- All Gitea tasks (issues, PRs, repos, comments, reviews) on `git.cloud.schroll-it.de` run through the **tea CLI** (`tea`, on PATH; binary at `~/.local/bin/tea`) — Basti's explicit preference. Use the REST API (`curl -H 'Authorization: token …'`) only for one-off queries tea cannot answer.
- One login exists: **`schroll-it`** (also the default) → user `Hermes` (Bot account, token auth, git credential helper configured). Org is **Schroll-IT**; repos: BiteBudget, freezy, heim-learning, pa-server.
- git HTTPS remotes authenticate silently via the credential helper tea registered; `~/.git-credentials` also holds the token (`credential.helper store`).

## Procedure

1. **Preflight (first tea call of a session):** `tea login status`. Expect a ✔ for `schroll-it` only. If any other/failed login entry shows up, delete it before doing anything else: `tea login rm <name>`.
2. **Locate work:** `tea repos`, `tea issues` (cross-repo), `tea issues ls --repo <owner>/<name>`, `tea pulls`.
3. **Act:** `tea issues create|comment|close`, `tea pulls create|checkout` — check `tea <cmd> --help` for flags; issues/PRs support `--output json` for parsing.
4. **Verify after any write** by reading back (`tea issues ls` / `tea pulls ls` on the target repo) before reporting success.

## Pitfalls

- A stale/broken login is silently chosen as **fallback in non-interactive mode**, killing every command with `invalid username, password or token` — run `tea login status` first and remove failures; the error points at auth, not at the command you ran.
- `tea login add` fails with `no password set` when `--user` is combined with `--token` (the `--user` path is basic-auth and wants a password). Pass only `--token --url --name` (+ `--git-credentials`).
- `tea login rm` has **no confirm flag** (`--yes` etc. aborts with a usage error); call it bare: `tea login rm <name>`.
- Write access comes from a Bot account named Hermes: comments/issues are attributed to "Hermes AI Bot", not Basti — say so when attribution matters.

## Setup / recovery

See `references/setup.md` for the tea install recipe (checksum-verified), PATH wiring, and login re-creation.
