Repository Mirroring
GitBlixt can keep repositories in sync with GitHub using push mirroring, pull mirroring, or one-time fetches. This lets you maintain copies of your repositories across platforms automatically.
Prerequisites
- A connected GitHub account (via OAuth) with push access to the target repository
- The GitHub OAuth App must be configured on your GitBlixt instance — see Importing from GitHub for setup instructions
Push Mirroring
Push mirroring automatically replicates every push you make to a GitBlixt repository over to GitHub. Whenever anyone pushes to your GitBlixt repo (via SSH or HTTP), all branches and tags are immediately pushed to the configured GitHub repository.
What gets mirrored
- All branches (created, updated, and deleted)
- All tags
- Force pushes
What does NOT get mirrored
- Pull/merge requests (these are platform-specific, not git data)
- Issues, labels, milestones, wikis
If you merge a merge request in GitBlixt, the resulting merge commit and branch deletion are mirrored — GitHub will see the branches update, it just won't show a corresponding pull request.
Setting up a push mirror
- Navigate to your repository's Settings page
- Scroll down to the Push mirroring section
-
Enter the GitHub repository in
owner/repoformat (the repository must already exist on GitHub) - Click Enable mirror
- An initial sync is queued immediately
After setup, every push to your GitBlixt repository will automatically trigger a mirror sync. You can also click Sync now to trigger a manual sync at any time.
Pull Mirroring
Pull mirroring fetches changes from GitHub into GitBlixt on a schedule. This is useful when GitHub is your primary development platform and you want GitBlixt to stay up to date automatically.
Setting up a pull mirror
- Navigate to your repository's Settings page
- Scroll down to the Pull mirroring section
- Enter the GitHub repository in
owner/repoformat - Choose a sync interval: 5 minutes, 10 minutes, 15 minutes (default), 30 minutes, or 1 hour
- Click Enable mirror
GitBlixt checks for updates at the configured interval. You can also click Sync now to fetch immediately without waiting for the next scheduled sync.
One-Time Fetch from Remote
If you don't want ongoing mirroring but just need to pull the latest changes from GitHub once (for example, after an initial import), use the Fetch from remote feature.
- Navigate to your repository's Settings page
- Scroll down to the Fetch from remote section
- Enter the GitHub repository in
owner/repoformat - Click Fetch
This fetches all branches and tags from the remote in a single operation. For private repositories, your connected GitHub OAuth token is used automatically. Public repositories are fetched directly without authentication.
Mirror Status
Each mirror shows its current status:
- Active — the mirror is working correctly. The last sync time is displayed.
- Error — the last sync failed. The error message is shown below the mirror. Common causes include expired OAuth tokens, deleted remote repositories, or permission issues. Mirrors in error state will automatically retry on the next sync attempt.
- Paused — the mirror is configured but not actively syncing.
Combining Push and Pull Mirrors
You can configure both a push mirror and a pull mirror on the same repository for the same GitHub repo. However, be careful with this setup — if both sides are receiving pushes, they can overwrite each other. This works best when one side is read-only.
Typical patterns:
- Primary on GitBlixt, mirror to GitHub: Use push mirroring. Develop on GitBlixt, and GitHub always has an up-to-date copy.
- Primary on GitHub, mirror to GitBlixt: Use pull mirroring. Develop on GitHub, and GitBlixt fetches changes on a schedule.
- One-time sync after import: Use Fetch from remote to catch up on changes that happened on GitHub since the initial import.
Troubleshooting
Mirror shows "error" status
Check the error message displayed below the mirror. Common issues:
- "No github OAuth token found" — reconnect your GitHub account via OAuth settings
- "OAuth token has expired" — reconnect your GitHub account to refresh the token
- Permission denied / 403 — ensure your GitHub account has push access to the target repository
-
Repository not found / 404
— verify the
owner/reponame is correct and the repository exists on GitHub
Changes aren't appearing on the mirror
Click Sync now to trigger an immediate sync and check if it succeeds. If it fails, the error message will indicate what went wrong.