chore(.cursor): 同步 rules/skills/docs 与 karuo-party(排除凭证);补充 .gitignore
Made-with: Cursor
This commit is contained in:
55
.cursor/scripts/README-gitea-sync.md
Normal file
55
.cursor/scripts/README-gitea-sync.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# 与 Gitea(192.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`
|
||||
Reference in New Issue
Block a user