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

56 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 与 Gitea192.168.1.201)同步
## 远程
- **gitea-local**`http://192.168.1.201:3000/fnvtk/soul-yongping.git`(拉取 + 推送)
## 手动同步
```bash
./.cursor/scripts/gitea-sync.sh
```
## 每 10 分钟自动同步macOS launchd
- 已安装:`~/Library/LaunchAgents/com.soul.yongping.gitea-sync.plist`
- 每 10 分钟执行一次,登录后自动加载
**启用:**
```bash
launchctl load ~/Library/LaunchAgents/com.soul.yongping.gitea-sync.plist
```
**停用:**
```bash
launchctl unload ~/Library/LaunchAgents/com.soul.yongping.gitea-sync.plist
```
**查看是否在跑:**
```bash
launchctl list | grep com.soul.yongping.gitea-sync
```
## 认证192.168.1.201 需登录时)
若 push/pull 需要账号密码,定时任务无法弹窗,请把凭证写进 remote URL勿提交到仓库
```bash
git remote set-url gitea-local 'http://用户名:token或密码@192.168.1.201:3000/fnvtk/soul-yongping.git'
```
或用系统钥匙串:
```bash
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`