chore: enforce PAT-only git sync workflow and ignore local credentials
Some checks are pending
CI / Frontend Build + Lint (push) Waiting to run
CI / Backend Build + Test + Prisma Checks (push) Waiting to run

This commit is contained in:
Austin A
2026-04-18 10:50:32 +01:00
parent 8c2d15225b
commit 2f0e1d586c
3 changed files with 140 additions and 0 deletions

View File

@@ -96,3 +96,34 @@ Then confirm:
- Use a dedicated Proxmox API user/token with least privileges.
- Keep backend bound to localhost (`127.0.0.1`) and expose only frontend port.
- Enable off-host backups for DB and app config.
## 5) PAT-Only Git Update Workflow (No Password Auth)
Use Personal Access Token (PAT) authentication only. Do not use account passwords for Git pull/push.
### A. Create PAT (Git server)
1. Sign in to your Git server user settings.
2. Create a PAT with minimum required scopes (`repo:read` for pull; add write only if needed).
3. Save it securely (password manager/secret vault).
### B. Update app on server with PAT (no credential persistence)
Run this on the server:
```bash
cd /opt/proxpanel
chmod +x infra/deploy/git-pat-sync.sh
export GIT_USERNAME="your_git_username"
export GIT_PAT="your_personal_access_token"
bash infra/deploy/git-pat-sync.sh \
--repo-dir /opt/proxpanel \
--branch main \
--repo-url https://git.votcloud.com/austindebest/proxpanel.git
unset GIT_PAT
```
Then deploy:
```bash
cd /opt/proxpanel
docker compose --env-file .env.production -f infra/deploy/docker-compose.production.yml up -d --build
```