1.3 KiB
1.3 KiB
与 Gitea(192.168.1.201)同步
远程
- gitea-local:
http://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