Common Issues and Solutions This guide covers the most common issues users encounter with GitBridge and their solutions.
Quick Diagnostics Before troubleshooting, run the diagnostic command:
Bash gitbridge diagnose --verbose
This will check: - ✓ Python version and dependencies - ✓ Network connectivity - ✓ GitHub API access - ✓ Proxy configuration - ✓ SSL certificates - ✓ Browser availability (if using browser method)
Authentication Issues Error: 401 Unauthorized Error Message
Text Only Error: Authentication failed (401 Unauthorized)
Please check your GitHub token
Causes: - Invalid or expired GitHub token - Token lacks required permissions - Token not properly configured
Solutions:
Verify token is valid:
Bash # Test token directly
curl -H "Authorization: token YOUR_TOKEN" https://api.github.com/user
Check token permissions:
Go to GitHub → Settings → Developer settings → Personal access tokens Ensure token has repo
scope for private repositories For public repos, public_repo
scope is sufficient
Set token correctly:
Bash # Environment variable (recommended)
export GITHUB_TOKEN = ghp_YourTokenHere
gitbridge sync --config config.yaml
# Command line
gitbridge sync --token ghp_YourTokenHere --repo URL --local PATH
# Config file
echo "auth:
token: ghp_YourTokenHere" >> config.yaml
Error: 403 Forbidden Error Message
Text Only Error: API rate limit exceeded (403 Forbidden)
Solutions:
Check rate limit status:
Bash curl -H "Authorization: token YOUR_TOKEN" \
https://api.github.com/rate_limit
Wait for rate limit reset:
Python # The error message will show when limit resets
# Typically 1 hour from when limit was hit
Use authentication to increase limits:
Unauthenticated: 60 requests/hour Authenticated: 5,000 requests/hour
Switch to browser method temporarily:
Bash gitbridge sync --method browser --config config.yaml
Network and Connectivity Issues Error: Connection Timeout Error Message
Text Only ConnectTimeout: HTTPSConnectionPool(host='api.github.com', port=443):
Max retries exceeded with url: /repos/user/repo
Causes: - Firewall blocking GitHub API - Proxy configuration required - Network connectivity issues
Solutions:
Test basic connectivity:
Bash # Test GitHub API
curl https://api.github.com
# Test with proxy
curl --proxy http://proxy:8080 https://api.github.com
Configure proxy:
Bash # Auto-detect
gitbridge sync --auto-proxy --config config.yaml
# Manual proxy
export HTTPS_PROXY = http://proxy.company.com:8080
gitbridge sync --config config.yaml
Try browser method:
Bash gitbridge sync --method browser --config config.yaml
Error: Proxy Authentication Required Error Message
Text Only ProxyError: 407 Proxy Authentication Required
Solutions:
Provide proxy credentials:
Bash # Windows domain authentication
export HTTPS_PROXY = http://DOMAIN\\ username:password@proxy:8080
# Regular authentication
export HTTPS_PROXY = http://username:password@proxy:8080
Use configuration file:
YAML network :
proxy :
https : http://proxy.company.com:8080
auth :
username : your_username
password : your_password
SSL/Certificate Issues Error: SSL Certificate Verification Failed Error Message
Text Only SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed:
self signed certificate in certificate chain
Causes: - Corporate proxy with custom certificates - Self-signed certificates - Missing root CA certificates
Solutions:
Auto-detect certificates:
Bash # Windows: Extract from certificate store
gitbridge sync --auto-cert --config config.yaml
Use custom certificate bundle:
Bash # Get company certificates from IT
gitbridge sync --ca-bundle /path/to/company-ca-bundle.crt
# Or set environment variable
export REQUESTS_CA_BUNDLE = /path/to/company-ca-bundle.crt
Combine certificates:
Bash # Combine company and default certificates
cat /etc/ssl/company-ca.crt $( python -m certifi) > combined.crt
export REQUESTS_CA_BUNDLE = combined.crt
Last resort - disable verification:
Bash # WARNING: Insecure! Only for testing!
gitbridge sync --no-ssl-verify --config config.yaml
Browser Method Issues Error: Chrome/Chromium Not Found Error Message
Text Only WebDriverException: Message: 'chromedriver' executable needs to be in PATH
Solutions:
Install Chrome/Chromium:
Bash # Windows
winget install Google.Chrome
# macOS
brew install --cask google-chrome
# Linux
sudo apt-get install chromium-browser
Specify browser path:
Bash gitbridge sync --method browser \
--browser-path "/usr/bin/chromium" \
--config config.yaml
Check ChromeDriver:
Bash # Selenium 4+ manages ChromeDriver automatically
# For manual installation:
pip install webdriver-manager
Error: Browser Timeout Error Message
Text Only TimeoutException: Message: timeout: Timed out receiving message from renderer
Solutions:
Increase timeout:
Bash gitbridge sync --method browser \
--browser-timeout 60 \
--config config.yaml
Run in non-headless mode for debugging:
Bash gitbridge sync --method browser --no-headless
Check memory usage:
Bash # Browser method uses more memory
# Ensure sufficient RAM available
free -h # Linux
File System Issues Error: Permission Denied Error Message
Text Only PermissionError: [Errno 13] Permission denied: '/path/to/file'
Solutions:
Check directory permissions:
Bash # Check permissions
ls -la /path/to/directory
# Fix permissions
chmod -R u+w /path/to/directory
Use different directory:
Bash gitbridge sync --local ~/writable-directory --repo URL
Run as appropriate user:
Bash # Avoid running as root
# Use your normal user account
Error: Disk Space Error Message
Text Only OSError: [Errno 28] No space left on device
Solutions:
Check available space:
Clean up old files:
Bash # Remove .gitbridge cache
rm -rf /path/to/repo/.gitbridge
# Full resync after cleanup
gitbridge sync --force --config config.yaml
Configuration Issues Error: Invalid Configuration Error Message
Text Only ConfigError: Invalid configuration file: config.yaml
Solutions:
Validate YAML syntax:
Bash # Online validator: https://www.yamllint.com/
# Or use Python
python -c "import yaml; yaml.safe_load(open('config.yaml'))"
Check required fields:
YAML # Minimum required configuration
repository :
url : https://github.com/user/repo
local :
path : /path/to/local
Use example configuration:
Bash cp config.example.yaml config.yaml
# Edit config.yaml with your settings
Error: Environment Variable Not Found Error Message
Text Only ConfigError: Environment variable GITHUB_TOKEN not found
Solutions:
Set environment variable:
Bash # Linux/macOS
export GITHUB_TOKEN = ghp_YourToken
# Windows Command Prompt
set GITHUB_TOKEN = ghp_YourToken
# Windows PowerShell
$env :GITHUB_TOKEN= "ghp_YourToken"
Use .env file:
Bash echo "GITHUB_TOKEN=ghp_YourToken" > .env
# GitBridge will load .env automatically
Slow Synchronization Symptoms: - Initial sync takes hours - Incremental updates are slow - High memory usage
Solutions:
Use API method (faster):
Bash gitbridge sync --method api --config config.yaml
Enable parallel downloads:
YAML sync :
parallel_downloads : 10
chunk_size : 2097152 # 2MB chunks
Skip large files:
YAML sync :
skip_large_files : true
large_file_size : 104857600 # 100MB
Use incremental mode:
Bash # Default behavior, but ensure it's enabled
gitbridge sync --incremental --config config.yaml
Repository-Specific Issues Error: Repository Not Found Error Message
Text Only HTTPError: 404 Client Error: Not Found for url: https://api.github.com/repos/user/repo
Solutions:
Check repository URL:
Bash # Correct format
https://github.com/owner/repository
# Not
https://github.com/owner/repository.git
https://github.com/owner/repository/tree/main
Check repository visibility:
Private repos require authentication Check if repo exists and you have access
Check for typos:
Bash # Test in browser first
open https://github.com/owner/repository
Error: Invalid Reference Error Message
Text Only GitBridgeError: Reference 'feature/branch' not found in repository
Solutions:
List available branches:
Bash # Using API
curl -H "Authorization: token YOUR_TOKEN" \
https://api.github.com/repos/owner/repo/branches
Use correct reference:
Bash # Branch
gitbridge sync --ref main
# Tag
gitbridge sync --ref v1.0.0
# Commit SHA
gitbridge sync --ref abc123def
Debug Mode For persistent issues, enable debug mode:
Bash # Maximum verbosity
gitbridge sync --config config.yaml \
--verbose \
--log-file debug.log
# Check log file
tail -f debug.log
Getting Help If these solutions don't resolve your issue:
Run diagnostics:
Bash gitbridge diagnose --verbose > diagnostic.txt
Collect information:
GitBridge version: gitbridge --version
Python version: python --version
Operating system: uname -a
(Linux/macOS) or ver
(Windows) Full error message and stack trace Configuration file (remove sensitive data)
Create issue:
Visit: https://github.com/nevedomski/gitbridge/issues/new Include diagnostic information Describe steps to reproduce Prevention Tips Test configuration early:
Bash gitbridge status --config config.yaml
Use verbose mode during setup:
Bash gitbridge sync --verbose --dry-run
Keep credentials secure:
Use environment variables for tokens Never commit tokens to version control
Monitor rate limits:
Bash gitbridge status --show-limits
Regular updates:
Bash pip install --upgrade gitbridge