User Guide¶
Welcome to the GitBridge User Guide. This comprehensive guide will help you understand and use all features of GitBridge effectively.
What You'll Learn¶
This guide covers everything from basic usage to advanced configurations:
- Different synchronization methods and when to use them
- Configuration options and best practices
- Authentication and security setup
- Corporate environment configurations
- Performance optimization techniques
- Troubleshooting common issues
Guide Sections¶
Sync Methods¶
Learn about the two synchronization methods (API and Browser) and when to use each one.
Configuration¶
Detailed guide to configuring GitBridge using YAML files, environment variables, and command-line options.
Authentication¶
Set up authentication for both API and browser methods, including token management and security best practices.
Incremental Sync¶
Understand how incremental synchronization works and how to optimize sync performance.
Branch Management¶
Learn how to sync specific branches, tags, or commits from your repository.
Corporate Setup¶
Configure GitBridge for corporate environments with proxies, PAC scripts, and custom certificates.
Proxy Configuration¶
Detailed guide to configuring various proxy types including HTTP, HTTPS, SOCKS, and PAC scripts.
SSL Certificates¶
Handle custom SSL certificates and certificate verification in restricted environments.
Quick Start Examples¶
Basic Synchronization¶
Sync a public repository:
Bash | |
---|---|
Authenticated Sync¶
Sync a private repository with authentication:
Bash | |
---|---|
Corporate Environment¶
Sync in a corporate environment with auto-detection:
Bash | |
---|---|
Using Configuration File¶
Create a config.yaml
file:
YAML | |
---|---|
Then run:
Bash | |
---|---|
Best Practices¶
1. Use Configuration Files¶
For repeated syncs, use a configuration file instead of command-line arguments:
- Easier to manage complex configurations
- Supports environment variable expansion
- Can be version controlled (exclude sensitive data)
2. Enable Incremental Sync¶
Always use incremental sync for better performance:
This only downloads changed files after the initial sync.
3. Set Up Authentication Properly¶
- Use environment variables for tokens
- Never commit tokens to version control
- Use read-only tokens when possible
- Rotate tokens regularly
4. Configure for Your Environment¶
- Use
--auto-proxy
and--auto-cert
on Windows - Configure specific proxy settings if auto-detection fails
- Test connectivity with
gitbridge status
before syncing
5. Monitor Sync Operations¶
- Use verbose mode (
-v
) for debugging - Check logs for any warnings or errors
- Monitor sync statistics for performance
Common Use Cases¶
Continuous Integration¶
Sync repositories in CI/CD pipelines:
Backup Solution¶
Create regular backups of repositories:
Development Environment¶
Keep local copies synchronized:
Bash | |
---|---|
Performance Tips¶
- Use API method when possible - It's faster and more efficient
- Enable parallel downloads - For large repositories
- Configure appropriate timeouts - Based on your network speed
- Use incremental sync - Avoid re-downloading unchanged files
- Exclude unnecessary files - Use ignore patterns for large binaries
Security Considerations¶
- Token Security
- Use minimal required permissions
- Store tokens securely (environment variables, secret managers)
-
Rotate tokens regularly
-
Network Security
- Verify SSL certificates
- Use secure proxy configurations
-
Monitor network traffic
-
Local Security
- Secure local repository copies
- Set appropriate file permissions
- Clean up temporary files
Getting Help¶
If you encounter issues:
- Check the Troubleshooting Guide
- Run with verbose mode (
-v
) for detailed output - Check the GitHub Issues
- Contact support if needed