azure_migrate/README.md

70 lines
1.6 KiB
Markdown
Raw Normal View History

2026-03-22 09:43:45 +00:00
# azure_migrate
Migrate from Azure to Forgejo
# Usage Instructions
Create your .env file:
bash
`cp .env.example .env`
# List repositories first (dry view):
bash
`go run main.go list`
# Run migration (dry run):
bash
`go run main.go migrate --dry-run`
# Execute actual migration:
bash
`go run main.go migrate`
## Key Features ##
# LFS Support:
The LFS: true flag in the migration request tells Forgejo to mirror LFS objects automatically.
# Concurrent Processing:
Uses worker pools to migrate multiple repositories simultaneously (configurable via CONCURRENT_MIGRATIONS).
# Detailed Error Handling:
Errors include repository name, project context, and specific failure reasons
Non-fatal errors don't stop the entire process
Summary report at the end
# Azure Authentication:
Properly handles Azure DevOps PAT authentication via Basic Auth header.
# Dry Run Mode:
Test the migration without creating any repositories.
# Mirror Configuration:
Sets up Forgejo to periodically sync from Azure DevOps using the Interval setting.
## Important Notes ##
# Network Access:
Ensure the machine running this has access to both Azure DevOps and your Forgejo instance.
# Storage:
Forgejo must have sufficient storage for LFS objects.
# Permissions:
Azure PAT needs "Code (read)" permissions
Forgejo token needs repository creation permissions
# Existing Repositories:
The tool skips if a repository already exists (to prevent overwrites).
# LFS in Mirrors:
Forgejo will handle LFS objects during the initial clone and subsequent syncs automatically when LFS: true is set.