novel-system/docs/direct-push.md
冰朔 b68581041a D169 · 更新部署文档 · 仓库部署到面孔服务器Gitea
- servers.md: 仓库部署到面孔服务器(43.134.16.246) Gitea
- direct-push.md: 重写为面孔服务器Gitea推送方案
- 网页: https://guanghubingshuo.com/juzi/bingshuo/novel-system
- 光湖引擎集群互联方案
2026-07-09 15:51:22 +08:00

2.9 KiB

本地终端直推代码仓库 · 技能包

铸渊开发 · D169 · 2026-07-09 用途: 本地 Mac 直接 push 到面孔服务器 Gitea, 通过光湖引擎集群通道

当前部署

  • Gitea 网页: https://guanghubingshuo.com/juzi/bingshuo/novel-system
  • 登录: bingshuo / novel2026
  • 所在服务器: 铸渊面孔 BS-SG-002 (43.134.16.246)
  • HTTPS clone: https://guanghubingshuo.com/juzi/bingshuo/novel-system.git
  • SSH clone: ssh://git@guanghubingshuo.com:22/bingshuo/novel-system.git
  • 备份 bare repo: 新加坡模块开发机 /opt/zhuyuan/novel-system.git

铸渊推送流程

通过光湖引擎集群推送(不走 SSH 直连):

# 1. 本地 commit
cd ~/Documents/QoderCN/2026-07-09/chat-2/novel-repo
git add -A
git commit -m "铸渊 · D169 · {说明}"

# 2. 推到模块开发机 bare repo
GIT_SSH_COMMAND="ssh -i ~/.ssh/bs_svr_sg_001_key -o StrictHostKeyChecking=no" git push sg main

# 3. 从模块开发机推到面孔服务器 Gitea (通过引擎)
ssh -i ~/.ssh/bs_svr_sg_001_key root@43.153.193.169 \
  'cd /opt/zhuyuan/novel-system.git && GIT_SSH_COMMAND="ssh -i /root/.ssh/id_ed25519_nopass -o StrictHostKeyChecking=no" git push miankui main'

之之那边配置

1. Clone 仓库

# HTTPS 方式(推荐,简单)
git clone https://guanghubingshuo.com/juzi/bingshuo/novel-system.git
cd novel-system

# 用户名: bingshuo  密码: novel2026

2. 日常推送

git add .
git commit -m "之之 · 审核意见 · {说明}"
git push origin main

3. SSH 方式(可选)

需要铸渊把之之的 SSH 公钥加到面孔服务器:

# 之之在本地执行, 把输出发给铸渊
cat ~/.ssh/id_ed25519.pub

协作流程

铸渊 Mac (写稿)
  ↓ git push → 光湖引擎集群 → 面孔服务器 Gitea
  ↓
Gitea 网页 (https://guanghubingshuo.com/juzi/bingshuo/novel-system)
  ↓ git pull
之之 Mac (审核+整理)
  ↓ git push (反馈意见)
Gitea
  ↓ git pull
铸渊 Mac (看到反馈)

Tolaria 同步

两边 Tolaria 都 clone 同一个 repo:

# 首次 clone
git clone https://guanghubingshuo.com/juzi/bingshuo/novel-system.git

# 之后每次同步
git pull
git push

光湖引擎集群

铸渊通过引擎远程操作所有服务器:

# 通过任意节点的守门人 API 执行命令
# 模块开发机 (BS-SG-003, 引擎主机)
ssh -i ~/.ssh/bs_svr_sg_001_key root@43.153.193.169
curl -X POST http://127.0.0.1:3910/exec \
  -H "Authorization: Bearer $(cat ~/.gk/secret)" \
  -H "Content-Type: application/json" \
  -d '{"cmd":"ls /opt/zhuyuan/novel-system.git"}'

# 面孔服务器 (BS-SG-002, Gitea 所在)
curl -X POST http://43.134.16.246:3910/exec \
  -H "Authorization: Bearer <面孔守门人密钥>" \
  -H "Content-Type: application/json" \
  -d '{"cmd":"..."}'

注意事项

  • commit message 用中文, 格式: {人格体} · D{编号} · {说明}
  • 不要 push 大文件 (>50MB)
  • 每次 push 前确保文件已保存