docs(runner): clarify registration tty token entry

This commit is contained in:
Your Name
2026-06-29 10:55:21 +08:00
parent 9f587f2566
commit 1e15079a4c
4 changed files with 29 additions and 1 deletions

View File

@@ -509,7 +509,19 @@ ssh ollama@192.168.0.188 'bash -s -- --check' \
正式註冊時helper 會用 silent TTY 讀取 runner token透過 stdin 餵給
`act_runner register`,不使用 `--token` argv、不列印 token、不讀 `.runner`
內容;若 `.runner` 已存在,預設只回報下一步 enable / verifier不覆寫。
內容;若 `.runner` 已存在,預設只回報下一步 enable / verifier不覆寫。正式註冊
不能用 `ssh -t ... 'bash -s' < ops/runner/register-awoooi-non110-runner.sh`
因為 stdin 會被 script 佔用而不是互動 TTY請先把 helper 放在 188 上,再用:
```bash
ssh -tt ollama@192.168.0.188 \
'cd /home/ollama/act-runner-awoooi && ./register-awoooi-non110-runner.sh'
```
若 Gitea 回 `runner registration token not found`,代表貼入的不是
`http://192.168.0.110:3001` 當前 scope 的 runner registration token、token 已過期,
或 scope 錯誤;重新從 `wooo/awoooi` repo / `wooo` org / instance runner 頁產生
registration token不要使用 Personal Access Token 或 API token。
註冊與 autostart 後CD lane 不能只靠「runner 已註冊」宣稱恢復;必須用
sanitized evidence 彙整 verifier

View File

@@ -20,6 +20,11 @@ Usage:
ops/runner/register-awoooi-non110-runner.sh --check
ops/runner/register-awoooi-non110-runner.sh
Remote registration:
Copy this script to the target host first, then run it from ssh -tt.
Do not pipe the script over stdin for the real registration path, because
token entry needs the interactive TTY.
Environment overrides:
GITEA_INSTANCE, RUNNER_NAME, RUNNER_LABELS, RUNNER_DIR, RUNNER_BINARY,
RUNNER_CONFIG, RUNNER_REGISTRATION

View File

@@ -19,6 +19,8 @@ def test_register_helper_has_no_token_argv_path() -> None:
assert "runner_token_in_argv=false" in text
assert "runner_token_echoed=false" in text
assert "raw_runner_registration_read=false" in text
assert "Copy this script to the target host first" in text
assert "Do not pipe the script over stdin" in text
def test_register_helper_rejects_runner_token_env(tmp_path: Path) -> None: