GitBridge - GitHub Repository Synchronization Tool
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
From PyPI (Recommended)
# 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
- 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
- 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 TokenGITSYNC_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)
| File | Size | Uploaded | |
|---|---|---|---|
| gitbridge-1.0.4.tar.gz | 60.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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