Files
soul-yongping/.cursor/scripts/README-gitea-sync.md
2026-03-19 15:03:01 +08:00

1.3 KiB
Raw Blame History

与 Gitea192.168.1.201)同步

远程

  • gitea-localhttp://192.168.1.201:3000/fnvtk/soul-yongping.git(拉取 + 推送)

手动同步

./.cursor/scripts/gitea-sync.sh

每 10 分钟自动同步macOS launchd

  • 已安装:~/Library/LaunchAgents/com.soul.yongping.gitea-sync.plist
  • 每 10 分钟执行一次,登录后自动加载

启用:

launchctl load ~/Library/LaunchAgents/com.soul.yongping.gitea-sync.plist

停用:

launchctl unload ~/Library/LaunchAgents/com.soul.yongping.gitea-sync.plist

查看是否在跑:

launchctl list | grep com.soul.yongping.gitea-sync

认证192.168.1.201 需登录时)

若 push/pull 需要账号密码,定时任务无法弹窗,请把凭证写进 remote URL勿提交到仓库

git remote set-url gitea-local 'http://用户名:token或密码@192.168.1.201:3000/fnvtk/soul-yongping.git'

或用系统钥匙串:

git config --global credential.helper osxkeychain
# 然后手动执行一次 gitea-sync.sh输入一次账号密码之后由钥匙串记住

日志

  • 脚本内部:.cursor/scripts/gitea-sync.log
  • launchd 标准输出:.cursor/scripts/gitea-sync-launchd.log
  • launchd 错误:.cursor/scripts/gitea-sync-launchd.err.log