Skip to content

rendeirolab/github-codeberg-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub to Codeberg mirror

Mirror all repositories from a GitHub organization to Codeberg, preserving visibility settings.

Features

  • Mirrors all org repositories (public and private)
  • Preserves repository visibility (private repos stay private)
  • Creates repositories on Codeberg if they don't exist
  • Updates existing mirrors incrementally
  • Dry-run mode for testing (--dry-run)
  • Single repository can be mirrored (--repo)
  • Can continue where left off (--skip-existing)

Requirements

  • Linux with git installed
  • uv package manager
  • GitHub Personal Access Token (classic) with repo scope
  • Codeberg Access Token with repository permissions
  • Codeberg organization must exist (create manually first)

Usage

$ uv run mirror.py --help
usage: mirror.py [-h] [--config CONFIG] [--dry-run] [--repo REPO] [--debug] [--check-token] [--skip-existing]

Mirror GitHub repos to Codeberg                      

options:                                                                                                                                                      
  -h, --help       show this help message and exit                                                                                                            
  --config CONFIG  Path to config file                                                                                                                        
  --dry-run        Show what would be done without making changes                                                                                             
  --repo REPO      Mirror only this specific repository                                                                                                       
  --debug          Enable debug output                                                                                                                        
  --check-token    Only check token permissions, don't mirror                                                                                                 
  --skip-existing  Skip repos that already exist on Codeberg (useful for initial sync)                                                                        

TODO:

  • make systemd service + timer
  • deploy on hilde workstation

About

Mirror all repositories from a GitHub organization to Codeberg, preserving visibility settings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages