update 05-gitea-tea: fix prereq reference, clarify GITEA_TOKEN comes from cfg sync -- 小糯

This commit is contained in:
小糯 (Xiaonuo) 2026-04-22 23:33:35 +08:00
parent eb10cc559a
commit 614a5105b7

View File

@ -1,5 +1,9 @@
# 05. Gitea 账号 & tea CLI
## 前置
- 已完成 02 (cfg CLI) — 需要 `cfg get GITEA_TOKEN`
## 检查
```bash
@ -7,7 +11,7 @@ which tea
tea login list
```
✅ 达标:`tea` 可用,login list 显示 `shazhou` 登录条目
✅ 达标:`tea` 可用,login list 显示 `shazhou` 登录条目且为 default
## 安装
@ -28,16 +32,21 @@ chmod +x /usr/local/bin/tea
### 登录 Gitea
用 03 步装好的 cfg 拿 token
GITEA_TOKEN 在 02 步 `cfg sync` 后就有了(shared scope),直接用
```bash
tea login add \
--name shazhou \
--url https://git.shazhou.work \
--token $(cfg get GITEA_TOKEN) \
--user YOUR_USERNAME
--user YOUR_USERNAME \
--no-version-check
tea login default shazhou
```
YOUR_USERNAME 替换为你的 Gitea 用户名(见下方对照表)。
### 注册 SSH 公钥到 Gitea
将 01 步生成的公钥注册上去,以后 git clone 可走 SSH:
@ -80,5 +89,5 @@ ssh -T git@git.shazhou.work 2>&1
```bash
tea repos
tea issues --repo xiaoju/uncaged
tea issues --repo scottwei/shazhou-workshop
```