chore(M00-A): 建立单仓库基线和参考清单
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Git 与部署流
|
||||
|
||||
## 固定仓库
|
||||
|
||||
- Windows/WSL SSH:`ssh://git@git.txyundm.cn:2222/panda/qipai.git`
|
||||
- 生产同机只读 SSH:`ssh://git@127.0.0.1:2222/panda/qipai.git`
|
||||
- 默认分支:`main`
|
||||
|
||||
## 本地推送
|
||||
|
||||
1. 在 `D:\qipai` 完成一个模块子阶段。
|
||||
2. 运行 Windows 检查脚本。
|
||||
3. 提交本模块相关文件。
|
||||
4. 执行 `git push origin main`。
|
||||
5. 执行 `git fetch origin main` 并校验 `HEAD == origin/main`。
|
||||
|
||||
推荐使用:
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File scripts/dev/windows/push-module.ps1 `
|
||||
-Message "chore(M00-C): 完善模块推送脚本" `
|
||||
-Paths @("scripts/dev/windows/push-module.ps1", "docs/git-deployment.md")
|
||||
```
|
||||
|
||||
如出现 `Host key verification failed`,先通过可信渠道确认 `git.txyundm.cn:2222` 的 SSH 主机指纹,再更新 `known_hosts`。Codex 不自动覆盖主机信任记录。
|
||||
|
||||
## SSH 检查
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File scripts/dev/windows/check-gitea-ssh.ps1
|
||||
```
|
||||
|
||||
该脚本只检查已有 known_hosts 与 SSH 握手,不自动写入新主机指纹。
|
||||
|
||||
## 当前已知阻塞
|
||||
|
||||
- 本地 `known_hosts` 只有 `[localhost]:2222` 记录,未安全确认 `[git.txyundm.cn]:2222`。
|
||||
- 最新 push 返回 `Host key verification failed`。
|
||||
- 在可信渠道确认主机指纹前,不应自动追加或覆盖 known_hosts。
|
||||
|
||||
## 生产发布
|
||||
|
||||
生产服务器不得因 Gitea push 自动发布。管理员必须在 Ubuntu 上通过 `/opt/apps/setup.sh` 菜单拉取、构建、迁移和复检。
|
||||
Reference in New Issue
Block a user