GitHub sync

Import a Git repository and keep its sync contract attached

Remote sync is configured through virtual repositories. The CLI imports the source repo into a Vex root path and records the branch, provider, and credentials metadata the platform uses for future sync runs.

CLI import with sync metadata

Use the GitHub shorthand form when the source repository is on GitHub. Passing a GitHub App installation id attaches the sync provider fields to the virtual repository.

vex import github <owner>/<repo> --org <org> --path <root-path> --virtual-repo <slug> --github-app-installation-id <id> --sync-branch main --sync-mode bidirectional --yes

Add --skip-sync to import the repository without attaching remote sync configuration.

Generic HTTP(S) Git

Use the generic Git import form when the source is not backed by a GitHub App. The remote URL and optional secret-backed credentials are stored on the virtual repository.

vex import git https://git.example.com/team/repo.git --org <org> --path <root-path> --virtual-repo <slug> --sync --sync-branch main --sync-mode bidirectional --yes

What Vex stores

sync_provider_kindgithub for GitHub App sync, git for generic HTTP(S) Git sync, none otherwise
sync_modepull, push, or bidirectional
github_app_installation_idGitHub App installation used by Vex workers
sync_repository_ownerGitHub owner from owner/repo
sync_repository_nameGitHub repository name from owner/repo
sync_remote_urlHTTP(S) Git remote URL used by generic Git sync and shown for GitHub sync
sync_auth_secret_idOptional Vex secret containing the generic Git token or password
sync_source_bookmarkSource bookmark or branch to read from the remote
sync_target_branchTarget Vex branch updated by sync runs
sync_auto_enabledWhether automatic polling is enabled for the virtual repository

Manual sync runs

The API exposes sync runs below a virtual repository. Creating a run queues the remote Git sync job and records status, provider, sync mode, source bookmark, target branch, and failure details.

POST /api/v1/virtual_repositories/<virtual_repository_id>/sync_runsView API reference