Files
Nexus/docs/project/linux-dev-paths.md
T
Nexus Deploy beb802802a chore: 添加 scripts/git-push.sh 与本地 Gitea secrets 约定
push 读取 deploy/nexus-1panel.secrets.sh(gitignore),clone/pull 仍可匿名。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 11:22:07 +08:00

51 lines
1.6 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.
# Linux 开发路径约定(SSOT
> **生效日期**: 2026-06-04
> 取代各 handoff 文档中的 `C:\Users\...` / `/mnt/c/...` 示例。
## 工作区
| 变量 | 示例 |
|------|------|
| `NEXUS_ROOT` | `~/Nexus``/home/you/Nexus` |
| Git 克隆 | `git clone http://66.154.115.8:3000/admin/Nexus.git "$NEXUS_ROOT"`(匿名,无需令牌) |
### Git push
- `git clone` / `git pull`:公共仓库可匿名。
- `git push``bash scripts/git-push.sh`(读取 `deploy/nexus-1panel.secrets.sh` 中的 `NEXUS_GITEA_TOKEN`,即 admin 密码;**该文件不入 git**)。
- 应用密钥仍在 `.env`,与 Gitea 无关。
## SSH / 部署
| 用途 | Linux |
|------|--------|
| SSH 配置 | `~/.ssh/config``Host nexus` |
| 私钥 | `~/.ssh/id_rsa_nexus` |
| 生产目录 | `/www/wwwroot/api.synaglobal.vip/` |
```bash
ssh nexus "cd /www/wwwroot/api.synaglobal.vip && git pull && supervisorctl restart nexus"
```
## Cursor MCP
- MySQL`scripts/linux_mcp_mysql.sh`(见 `docs/project/mysql-mcp-setup.md` §4
- 本地验证:`bash scripts/local_verify.sh`(见 `docs/project/local-integration-test.md`
- **勿**在 `mcp.json` 使用 `wsl` + Windows 路径(已废弃)
## 历史文档
`docs/handoff-2026-05-31.md``AI-HANDOFF-2026-05-23.md` 等保留 Windows 示例作归档;**以本文 + `AI-HANDOFF-2026-06-03.md` 为准**。
## 本地验收账号
```bash
# .env(不入 git
NEXUS_TEST_ADMIN_USER=admin
NEXUS_TEST_ADMIN_PASSWORD='你的本地密码'
python3 scripts/seed_local_admin.py # 仅空库 + 127.0.0.1
cd frontend && NEXUS_E2E_BASE=http://127.0.0.1:8600 npm run test:e2e
```