Skip to main content

GitBridge - GitHub Repository Synchronization Tool

CI GitHub Release PyPI Version PyPI Downloads Python Versions codecov Tests Known Vulnerabilities Ruff Format Ruff Lint MyPy License Docs

Production-ready tool to synchronize GitHub repositories when direct git access is blocked.

🎉 v1.0.0 Released! - First stable release now available on PyPI

Features

  • GitHub API Sync: Uses GitHub's REST API for efficient repository synchronization
  • Browser Automation Fallback: Falls back to Playwright-based browser automation if API access is blocked
  • Incremental Updates: Only downloads changed files after initial sync
  • Configuration Support: Flexible configuration via YAML files
  • Command-Line Interface: Easy-to-use CLI for various sync operations
  • Progress Tracking: Visual progress bars and detailed logging
  • Automatic Proxy Detection: Auto-detects proxy settings from Windows/Chrome PAC scripts
  • Corporate Environment Support: Works with SSL certificates and proxy configurations
  • Cross-Platform: Works on Windows, Linux, and macOS
  • Comprehensive Testing: 502+ tests with 83% code coverage

Installation

# Basic installation
pip install gitbridge

# With browser automation support
pip install gitbridge[browser]

# For development
pip install gitbridge[dev]

Windows Users

Windows dependencies (pypac, wincertstore, pywin32) are automatically installed when you install GitBridge on Windows.

From Source

Using uv:

# Clone the repository
git clone https://github.com/nevedomski/gitbridge.git
cd gitbridge

# Install with uv
uv pip install -e .

# Or with all extras
uv pip install -e ".[all]"

Quick Start

  1. Create a configuration file (config.yaml):
repository:
  url: https://github.com/username/repo
  branch: main

local:
  path: /path/to/local/folder

auth:
  token: your_github_personal_access_token

sync:
  method: api  # or 'browser'
  incremental: true
  1. Run the sync:
gitbridge sync --config config.yaml

Usage

Basic Sync

gitbridge sync --repo https://github.com/username/repo --local /path/to/local

With Personal Access Token

gitbridge sync --repo https://github.com/username/repo --local /path/to/local --token YOUR_TOKEN

Force Browser Mode

gitbridge sync --repo https://github.com/username/repo --local /path/to/local --method browser

Check Repository Status

gitbridge status --config config.yaml

Corporate Environment Support

For Windows users in corporate environments:

# Auto-detect proxy from Chrome/Windows settings
gitbridge sync --repo https://github.com/username/repo --local /path/to/local --auto-proxy

# Auto-detect certificates from Windows certificate store
gitbridge sync --repo https://github.com/username/repo --local /path/to/local --auto-cert

# Use both auto-detection features together
gitbridge sync --config config.yaml --auto-proxy --auto-cert

# Last resort: disable SSL verification
gitbridge sync --config config.yaml --auto-proxy --no-ssl-verify

Or add to your configuration file:

sync:
  auto_proxy: true   # Auto-detect proxy from PAC
  auto_cert: true    # Auto-detect certificates from Windows
  # verify_ssl: false  # Only if absolutely necessary

The tool will automatically:

  • Extract proxy settings from Windows/Chrome PAC scripts
  • Export trusted certificates from Windows certificate store
  • Combine them with certifi's default bundle
  • Configure requests to use both proxy and certificates

Configuration

Environment Variables

  • GITHUB_TOKEN: GitHub Personal Access Token
  • GITSYNC_CONFIG: Default configuration file path

Configuration File Format

See config.example.yaml for a complete example.

Requirements

  • Python 3.10+ (recommended: 3.11+)
  • uv for dependency management
  • For browser mode: Chrome/Chromium and ChromeDriver

Development

# Install development dependencies
make install-dev

# Format code
make format

# Run linting
make lint

# Type checking
make type-check

# Run tests
make test

Limitations

  • Binary files larger than 100MB may fail with API method
  • Browser method is significantly slower than API method
  • Some GitHub Enterprise features may not be supported

License

MIT License

Metadata

Release files for gitbridge 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitbridge 1.0.4
File Size Uploaded
gitbridge-1.0.4.tar.gz 60.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gitbridge 1.0.4
File Interpreter ABI Platform
gitbridge-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 131.2 kB

Release files / gitbridge-1.0.4.tar.gz

Download URL gitbridge-1.0.4.tar.gz
Size 60.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5907cb275da31cb9850f3bdb4856b74d6d0a7e89e875e3a40d18a8970a74750a
BLAKE2b-256 checksum
How to use checksums
891868f74254d826aff3cbf55922b0d66d3a36aba187ad90f34fee4e5e44962a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2025.

Transparency log

Release files / gitbridge-1.0.4-py3-none-any.whl

Download URL gitbridge-1.0.4-py3-none-any.whl
Size 71.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16ce6763d3d2e2e4ff597fd792d827886de0a450bfae47d2d0947e067b63bf95
BLAKE2b-256 checksum
How to use checksums
22b89438a9511d037abbd78239deaa06ebcea40cff643121bbfd9b01a6888d21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page