<< All versions

Skill v1.0.0

currentAutomated scan100/100
jcrabapple/hermes-skills/git-forge-migration
──Details
PublishedOctober 25, 2026 at 11:36 PM
Content Hashsha256:ea8ddbefc17bf8a9...
Git SHAd5ec4863cfa1
──Files
Files (1 file, 4.0 KB)
SKILL.md4.0 KBactive
SKILL.md · 89 lines · 4.0 KB

version: "1.0.0" name: git-forge-migration description: > Migrate repos between git forges (GitHub/Gitea/Codeberg). tags:

  • git
  • github
  • gitea
  • codeberg
  • migration

metadata: author: hermes version: "1.0"


Git Forge Migration

Use when the user wants to move or mirror repositories between hosting platforms (GitHub, Gitea, Forgejo, Codeberg, GitLab), or when deciding where to host repos.

Context

the user runs a self-hosted Gitea at eminent-kagu.pikapod.net (Pikapods, v1.27.2), already used for Obsidian vault sync. Public repos live on GitHub. Codeberg is a Forgejo (Gitea fork) nonprofit host. As of 2026-08 he is evaluating leaving GitHub after recurring outages. The current plan and repo lists live in Obsidian: Projects/Git Forge Migration - Plan.md — read it before executing anything.

Assessment workflow (validated 2026-08)

  1. Inventory and classify repos (forks vs originals, private vs public):
bash
gh repo list --limit 200 --json name,isPrivate,isFork,parent,pushedAt
  1. Count GitHub Actions workflows per repo to gauge CI migration cost:
bash
gh repo list --limit 200 --json name | python3 -c "import json,sys; print('\n'.join(r['name'] for r in json.load(sys.stdin)))" | xargs -P 8 -I{} sh -c 'n=$(gh api repos/OWNER/{}/contents/.github/workflows --jq "length" 2>/dev/null || echo 0); [ "$n" != "0" ] && echo "{}: $n"'
  1. Check target forges are reachable and current:

curl -s https://<gitea>/api/v1/version and curl -s -o /dev/null -w '%{http_code}' https://codeberg.org/api/v1/version

Decision framework

  • Neither target beats GitHub on raw uptime. A self-hosted Gitea on one

Pikapod is a single point of failure plus admin burden; Codeberg is small nonprofit infra with a history of capacity/abuse incidents. Availability comes from redundancy (multi-remote), not from moving to a smaller host.

  • Recommended shape: Gitea primary (matches the user's self-hosting pattern,

natural home for private repos, Actions-compatible CI via act_runner, ActivityPub federation), Codeberg as public mirror (FOSS visibility on a nonprofit host), GitHub kept as a mirror (discoverability; forks live there anyway).

  • CI porting cost: Gitea Actions is syntax-compatible with GitHub Actions;

Codeberg's Woodpecker is not. If repos use Actions workflows, Gitea is the cheaper target.

  • Forks never migrate. They exist because upstream lives on GitHub; PR

contribution workflows stay there. Only originals are candidates.

  • GitHub Pages sites (e.g. jcrabapple.github.io) stay on GitHub.

Mirror-first strategy (proposed, not yet executed)

The assessment above is validated; the execution phases below were designed but not yet run. Verify against current Gitea/Codeberg docs when executing.

  1. Create migration repos on targets. Set up Gitea push mirrors

(Settings > Push Mirror) so every push to Gitea lands on GitHub and Codeberg automatically. Add all three remotes locally; keep origin on GitHub until the flip is decided. Run mirrors for weeks before committing.

  1. Flip primary: point origin at Gitea, migrate issues/PRs per repo via

Gitea's "New Migration" (one-time), set up Renovate for dep updates.

  1. Harden Gitea before it becomes primary home of many repos: custom domain

(not the pikapod.net slug), offsite backups (mirrors are the second copy), act_runner if CI is wanted, confirm open registration is disabled.

Pitfalls

  • gh repo list --json parent returns parent objects whose exact fields vary

(nameWithOwner can be absent) — read defensively with .get(), don't index fields blindly.

  • The workflow-count loop mixes gh API 404 noise into stdout for repos without

workflows; the real signal is the name: N lines. Filter stderr or accept the noise.

  • Private repos: Codeberg allows them but prefers FOSS use; self-hosted Gitea

is the natural home for private work.

  • Long repo lists sort the same as everything else: keep the fork/original

split explicit in any saved plan so future sessions don't re-derive it.

All versions