Files
firefrost-operations-manual/docs/skills/tea-cli/references/authentication.md
Claude 5da8320827 feat(skills): Add tea-cli for Gitea command-line operations
- Official Gitea CLI (tea) for issues, PRs, releases
- Includes reference docs: authentication, commands, workflows
- Useful for scripting and CI/CD integration
- Updated SKILLS-INDEX.md

Chronicler #73
2026-04-09 13:16:16 +00:00

1.9 KiB

Tea CLI Authentication

Token Creation

  1. Open Gitea web UI
  2. Go to Settings → Applications
  3. Under "Generate New Token", enter a name
  4. Select scopes (or leave empty for full access)
  5. Click Generate Token
  6. Copy the token immediately (shown only once)

Adding a Login

# Interactive
tea login add

# Non-interactive
tea login add \
  --name myserver \
  --url https://gitea.example.com \
  --token ghp_xxxxxxxxxxxx

# With SSH key authentication
tea login add \
  --name myserver \
  --url https://gitea.example.com \
  --ssh-key ~/.ssh/id_ed25519

Managing Logins

tea login list              # List all logins
tea login default myserver  # Set default
tea login edit myserver     # Modify login
tea login delete myserver   # Remove login

Environment Variables

export GITEA_SERVER_URL=https://gitea.example.com
export GITEA_SERVER_TOKEN=your_token

# Or per-command
GITEA_SERVER_TOKEN=xxx tea issues

Multiple Instances

# Add multiple servers
tea login add --name work --url https://git.work.com --token xxx
tea login add --name personal --url https://gitea.io --token yyy

# Switch between them
tea issues --login work
tea pr --login personal

# Set default
tea login default work

OAuth Flow

# Browser-based OAuth
tea login add --name myserver --url https://gitea.example.com

# Refresh expired OAuth token
tea login oauth-refresh myserver

CI/CD Usage

# GitHub Actions example
- name: Create PR
  env:
    GITEA_SERVER_URL: ${{ secrets.GITEA_URL }}
    GITEA_SERVER_TOKEN: ${{ secrets.GITEA_TOKEN }}
  run: tea pr create --head ${{ github.ref_name }} --base main

Troubleshooting

Issue Solution
"401 Unauthorized" Token expired or invalid - regenerate
"no login" Run tea login add first
Wrong server Check tea login list, use --login name
SSH auth fails Ensure key is added to Gitea account