https://github.com/nevedomski/gitbridge
GitBridge - GitHub Repository Synchronization Tool
https://github.com/nevedomski/gitbridge
api github sync syncronization
Last synced: about 2 months ago
JSON representation
GitBridge - GitHub Repository Synchronization Tool
- Host: GitHub
- URL: https://github.com/nevedomski/gitbridge
- Owner: nevedomski
- License: mit
- Created: 2025-08-05T14:17:28.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-31T22:14:22.000Z (9 months ago)
- Last Synced: 2025-09-28T02:29:06.858Z (8 months ago)
- Topics: api, github, sync, syncronization
- Language: Python
- Homepage: https://nevedomski.github.io/gitBridge/
- Size: 1.21 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# GitBridge - GitHub Repository Synchronization Tool
[](https://github.com/nevedomski/gitBridge/actions)
[](https://github.com/nevedomski/gitbridge/releases)
[](https://pypi.org/project/gitbridge/)
[](https://pypi.org/project/gitbridge/)
[](https://pypi.org/project/gitbridge/)
[](https://codecov.io/gh/nevedomski/gitBridge)
[](https://github.com/nevedomski/gitbridge/actions)
[](https://snyk.io/test/github/nevedomski/gitbridge)
[](https://github.com/nevedomski/gitbridge/actions)
[](https://github.com/nevedomski/gitbridge/actions)
[](https://github.com/nevedomski/gitbridge/actions)
[](./LICENSE)
[](https://nevedomski.github.io/gitBridge/)
**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)
```bash
# 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](https://github.com/astral-sh/uv):
```bash
# 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`):
```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
```
2. Run the sync:
```bash
gitbridge sync --config config.yaml
```
## Usage
### Basic Sync
```bash
gitbridge sync --repo https://github.com/username/repo --local /path/to/local
```
### With Personal Access Token
```bash
gitbridge sync --repo https://github.com/username/repo --local /path/to/local --token YOUR_TOKEN
```
### Force Browser Mode
```bash
gitbridge sync --repo https://github.com/username/repo --local /path/to/local --method browser
```
### Check Repository Status
```bash
gitbridge status --config config.yaml
```
### Corporate Environment Support
For Windows users in corporate environments:
```bash
# 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:
```yaml
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](https://github.com/astral-sh/uv) for dependency management
- For browser mode: Chrome/Chromium and ChromeDriver
## Development
```bash
# 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