docs: add Gitea sync info + access token to AGENTS.md

This commit is contained in:
M5Max128
2026-05-21 17:27:33 +08:00
parent 3c458dfc5c
commit e1dbd27333

View File

@@ -551,6 +551,40 @@ shellcheck scripts/*.sh monitor/**/*.sh
**注意**: Hook 只檢查 error 等級的 shellcheck 問題style 警告會顯示但不阻擋提交。
## Gitea Sync
主要 sync 管道為 Gitea`http://192.168.110.200:3000/admin/momentry_core.git`
### 產生 Access Token首次設定
```bash
# admin 帳號密碼為 AccusysTest!
TOKEN=$(curl -s -X POST "http://192.168.110.200:3000/api/v1/users/admin/tokens" \
-u "admin:AccusysTest!" \
-H "Content-Type: application/json" \
-d '{"name":"m5max128_push","scopes":["write:repository"]}' | jq -r '.sha1')
echo $TOKEN
```
### 設定 Remote
```bash
# 用 token 取代密碼
git remote add origin http://admin:TOKEN@192.168.110.200:3000/admin/momentry_core.git
# 同步
git pull origin main
git push origin main
```
### Token 記錄
| 機器 | Token |
|------|-------|
| M5Max128 | `a7cf946148063c2bfa8d59ad629ae541813f0db8` |
**注意**: Token 有 write:repository scope勿外洩。如需新增 token 給其他機器,各自產自己的 token。
## Release Workflow
### Release 前準備