Fix stale Gitea host and record access facts in AGENTS.md
Why: the TASK_CARD_WEB_BASE default in scripts/task.sh still pointed at git-panel.u1680832.nyat.app:30319, which now fails the TLS handshake (curl exit 35), breaking card-close PR links and API calls; agents also kept rediscovering hosts and credential locations from scratch each session. Evidence: curl https://git-panel...:30319/api/v1/version -> exit 35; curl https://git-home...:30319/api/v1/version with token from ~/.secrets/gitea -> {"version":"1.27.3"}; ssh -p 31411 git@git-ssh... -> 'Hi there, weichen!' with key ~/.ssh/home_gitea (ED25519, fingerprint SHA256:GYXaOXIMeloQ1fKSfdJ/ndgPQzs/Ix7Hk62ekfkfQ20, key name GMKtec). Impact: task.sh default web base now resolves to the live host; AGENTS.md gains a Gitea access-facts section recording hosts plus credential locations only (no secret values, per baseline hard boundary 2). Follow-up PRs propagate the same section to the other project repos. Refs: task card feature-gitea-access-facts
This commit is contained in:
@@ -6,11 +6,12 @@
|
||||
|
||||
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 0654e035435ee6016ca8116f6eb394a824a0b9e2
|
||||
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-gitea-access-facts(worktree);分支:feature/gitea-access-facts
|
||||
- 授权与交付终点:<本次允许的动作与终点;未授权事项写明>
|
||||
- 授权与交付终点:用户 2026-09-30 授权——把实测可用的 Gitea 主机与凭证位置写入本仓及各相关仓的项目规范(AGENTS.md),终结每次试错;终点为分支经 PR 合入 main。未授权:改写 Development-Guidelines(其 AGENTS.md 禁止项目事实)、迁移仓库 URL、变更凭证本身。
|
||||
|
||||
## 目标与非目标
|
||||
|
||||
<预期结果、受影响入口/模块/契约;明确不做什么。>
|
||||
- 目标:① `scripts/task.sh` 的 `TASK_CARD_WEB_BASE` 默认值由失效的 `git-panel...:30319` 改为实测可用的 `git-home...:30319`;② 本仓 AGENTS.md 增补「Gitea 与 Git 访问事实」节(HTTPS Web/API、SSH、token 文件指针、SSH key 指针),只记位置与字段格式,不写 secret 值。
|
||||
- 非目标:不改各子仓 URL、不动 Development-Guidelines、不在仓内写入 token 值或私钥。
|
||||
|
||||
## 同步记录
|
||||
|
||||
|
||||
@@ -30,3 +30,22 @@
|
||||
- 模块边界、公开契约与隔离档位见 `policy/modules/`(如有)与 PROJECT.md。
|
||||
- 验证命令见 PROJECT.md「验证」节;完成声明须附实际命令输出证据。
|
||||
- 首次克隆本仓后运行 `make setup` 启用本地 pre-commit 钩子。
|
||||
|
||||
## Gitea 与 Git 访问事实(2026-09-30 实测)
|
||||
|
||||
历史任务卡与旧脚本里的 `git-panel.u1680832.nyat.app:30319` 已失效(TLS 握手失败),
|
||||
见到一律按过期处理,不要再试。当前权威通道:
|
||||
|
||||
- **Web / API(HTTPS)**:`https://git-home.u1680832.nyat.app:30319`(Gitea 1.27.3,
|
||||
API 前缀 `/api/v1`;偶发 broken pipe / 超时,重试即可)。
|
||||
- **Git over SSH**:`ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/<Repo>.git`
|
||||
(.gitmodules 与各仓 origin 均为此格式)。
|
||||
- **API token**:`~/.secrets/gitea`,两行键值 `URL_PREFIX=…` 与
|
||||
`ACCESS_TOKEN=<40 位 hex>`;取值 `grep ACCESS_TOKEN ~/.secrets/gitea | cut -d= -f2-`,
|
||||
用作 `Authorization: token <值>` 请求头。**token 值不入仓、不回显、不写进产出物**
|
||||
(baseline 硬边界 2:只记录来源、字段与可用状态)。
|
||||
- **SSH key**:`~/.ssh/home_gitea`(ED25519,公钥指纹
|
||||
`SHA256:GYXaOXIMeloQ1fKSfdJ/ndgPQzs/Ix7Hk62ekfkfQ20`,Gitea 侧密钥名 GMKtec);
|
||||
`~/.ssh/config` 已有 `git-ssh.u1680832.nyat.app` 主机条目,克隆/推送直接可用。
|
||||
- 任务卡闭合 PR(`make task-close` / `task-finish` 自动闭合)经 API 建 PR 时以
|
||||
`GITEA_TOKEN` 环境变量传入同上的 token。
|
||||
|
||||
+3
-2
@@ -171,8 +171,9 @@ cmd_close() {
|
||||
local fold=0
|
||||
[ "${1:-}" = "--fold" ] && fold=1
|
||||
git fetch -q origin "${TARGET_BRANCH}" 2>/dev/null || true
|
||||
# 默认值取远端通告的 Web 面(git push 输出的 PR 建议链接);可用 TASK_CARD_WEB_BASE 覆盖
|
||||
local web_base="${TASK_CARD_WEB_BASE:-https://git-panel.u1680832.nyat.app:30319}"
|
||||
# 默认值取远端通告的 Web 面(git push 输出的 PR 建议链接);可用 TASK_CARD_WEB_BASE 覆盖。
|
||||
# git-panel 前缀已失效(TLS 握手失败),默认值改为实测可用的 git-home(AGENTS.md 访问事实节)。
|
||||
local web_base="${TASK_CARD_WEB_BASE:-https://git-home.u1680832.nyat.app:30319}"
|
||||
local url owner repo
|
||||
url=$(git remote get-url origin); url="${url%.git}"
|
||||
repo=$(basename "$url"); owner=$(basename "$(dirname "$url")")
|
||||
|
||||
Reference in New Issue
Block a user