Files
video-montage-linker/gitea-push-mirror-setup.md
2026-02-03 16:21:56 +01:00

1.3 KiB

Gitea Push Mirror Setup Instructions

Prerequisites

  • Gitea API token
  • GitHub Personal Access Token (PAT) with repo scope

Tokens

Service Token
Gitea 1b99442d046cdfa2f5d76322a6081131a0561c53
GitHub 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

API Endpoint

POST http://192.168.1.1:3000/api/v1/repos/{owner}/{repo}/push_mirrors

Command Template

curl -X POST "http://192.168.1.1:3000/api/v1/repos/Ethanfel/{REPO_NAME}/push_mirrors" \
  -H "Authorization: token 1b99442d046cdfa2f5d76322a6081131a0561c53" \
  -H "Content-Type: application/json" \
  -d '{
    "remote_address": "https://github.com/Ethanfel/{REPO_NAME}.git",
    "remote_username": "Ethanfel",
    "remote_password": "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",
    "interval": "8h0m0s",
    "sync_on_commit": true
  }'

Replace {REPO_NAME} with the actual repository name.

Verify Mirror

curl "http://192.168.1.1:3000/api/v1/repos/Ethanfel/{REPO_NAME}/push_mirrors" \
  -H "Authorization: token 1b99442d046cdfa2f5d76322a6081131a0561c53"

Notes

  • GitHub repo must exist before creating the mirror
  • Gitea runs on port 3000 (not 443)
  • sync_on_commit: true pushes to GitHub on every commit
  • interval: 8h0m0s syncs every 8 hours regardless of commits