# 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.