github-to-rithub/docs/github-suspended-account.md
caelum0x 8af41526c5 feat: github-to-rithub CLI — mirror GitHub repos to Rithub with dry-run/resume/report
Zero-dependency Node CLI that lists a user's GitHub repos and migrates
selected ones to Rithub via Rithub's own (Gitea) /repos/migrate API,
carrying code, branches, tags, issues, labels, milestones, releases and
wiki. Adds dry-run, a resumable state file, and JSON/Markdown reports.
Includes 3 honest migration guides (suspended-account recovery, GitHub
Actions -> Rithub CI, keeping a GitHub mirror).

Real-tested 2026-11-17: migrated 3 live public GitHub repos
(basic-rag, defi-social-app, house-price-prediction) to a new
github-migration-test org on rithub.dev; verified branches/clone over
the live Rithub API; confirmed --resume skip and existing-repo
collision skip both work for real. Fixed a real bug found during
testing: repeated --repo flags were overwriting each other instead of
accumulating.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:23:16 +03:00

34 lines
2.7 KiB
Markdown

# My GitHub account got suspended — how do I get my code out?
This is the scenario this tool exists for. A real, documented risk of depending on any single platform: GitHub can suspend or restrict an account (ToS flags, automated abuse detection, a disputed DMCA claim, billing disputes) and your repos — including private ones — become inaccessible until it's resolved, which can take days to weeks, sometimes longer, with GitHub Support as your only channel.
## If your account is suspended right now
If you're already locked out, this tool can't help directly — it needs a working GitHub token, and a suspended account's tokens stop working too. Your real options, honestly:
1. **Open a GitHub Support ticket immediately** (support.github.com) — this is the only path back into a suspended account. There's no API workaround.
2. **Check if a teammate/org co-owner still has access.** Organization repos survive an individual member's suspension; only the member's own access is cut. If you're in an org, a co-owner can export immediately.
3. **Check for existing local clones.** If you or any collaborator has a local `git clone`, you have 100% of the git history (commits, branches, tags) already — you're only missing GitHub-native metadata (issues, PR discussion threads, releases' non-git parts). That's enough to keep working.
4. **If you have an old personal access token that still works** (tokens occasionally outlive a fresh suspension for a short window, though this isn't guaranteed and shouldn't be relied on), run this tool immediately with it before it's revoked too.
## The real fix: don't wait until you're locked out
Run this tool *before* you need it, on a recurring basis, while your GitHub account is healthy:
```bash
export GITHUB_TOKEN=ghp_xxx
export RITHUB_TOKEN=xxxxxxxxxxxx
github-to-rithub migrate --github-user your-username --rithub-owner your-rithub-username --all --resume
```
Re-running the same command periodically (a weekly cron job, say) keeps a Rithub copy current for anything you've added or changed on GitHub — see `docs/keeping-a-github-mirror.md` for the lower-effort "mirror, don't migrate" version of this if you want to keep using GitHub day-to-day while insuring against exactly this scenario.
## What actually gets preserved vs. lost in a true worst-case (no token, no local clone, no co-owner)
Be honest with yourself about this before it happens:
- **Preserved by GitHub itself, independent of your account:** nothing automatically. GitHub does not email you a backup.
- **Lost if your account and every collaborator's access and every local clone are all gone:** everything — there is no recovery path except GitHub Support reinstating the account.
This is exactly why the right time to run this tool is today, not after an incident.