railyard/apps/rithub-server/custom/public/assets/seo/migrate-from-github-to-hosted-git.html
caelum0x 6801c08af9
Some checks failed
ci / cargo test (abacus) (push) Has been cancelled
ci / cargo test (agent-runtime) (push) Has been cancelled
ci / cargo test (context-passport) (push) Has been cancelled
ci / cargo test (game-economy) (push) Has been cancelled
ci / cargo test (ledgerline) (push) Has been cancelled
ci / cargo test (mint) (push) Has been cancelled
ci / cargo test (rago) (push) Has been cancelled
ci / cargo test (relay) (push) Has been cancelled
ci / node suites (push) Has been cancelled
ci / cargo test (toolgate) (push) Has been cancelled
ci / cargo test (turnstile) (push) Has been cancelled
ci / cargo test (vend) (push) Has been cancelled
feat(RIT-OPS,RIT-BRD): rename gitea -> rit everywhere we control, deployed + live-verified
apps/gitea -> apps/rithub-server; compose services/containers renamed
(rithub-server-app/postgres/act-runner) with explicit project name and
volume names pinned to the exact existing Docker volumes (no data loss);
our own GITEA_* compose/env var names -> RIT_*; new rit-admin CLI wrapper
on railyard-box; giteaSession.mjs/giteaOAuth.mjs/giteaInfo.mjs ->
ritSession/ritOAuth/ritInfo across 6 apps; GiteaForgeAdapter -> RitForgeAdapter
+ giteaSyncService/importGiteaRepos/syncGiteaRepos -> rit* in ritgram
(tsc clean); apps/console/lib/gitea.ts -> lib/ritProvision.ts; Go
internal/giteaclient -> internal/ritclient in rithub-async-import (go
build/test clean); new /auth/rit + /forges/rit/connect routes with
/gitea back-compat aliases; locale/swagger/footer/captcha template text
scrubbed of remaining "Gitea" strings.

Deployed to railyard-box: old containers stopped/removed, /srv/railyard-gitea
renamed to /srv/rithub-server with a symlink kept, docker compose up -d from
the new path, act_runner network-alias fix for its persisted instance URL.
Live-verified: docker compose config diff showed zero unintended value
changes, DB row counts unchanged (19 users, 635 repos), full route
regression 200/expected, 0 "gitea" in headers/bodies on every checked page,
real git clone+push over HTTPS and SSH with a disposable account (deleted
after). Deferred on purpose (documented in plans/railyard.md): the forge
discriminator / DB column names / Postgres role+volume names (data
migrations, not a naming change) and the upstream GITEA__ env-to-ini keys
and X-Gitea-* wire headers (hardcoded in the vendored engine binary).

See plans/railyard.md RIT-OPS/RIT-BRD entry for the full old->new map and
live evidence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-12-01 16:34:39 +03:00

147 lines
8.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Migrate From GitHub to Hosted Git — Rithub</title>
<meta name="description" content="Step-by-step guide to migrate repositories, issues, and history from GitHub to a hosted git host like Rithub, with no downtime and no lost history.">
<link rel="canonical" href="https://rithub.dev/assets/seo/migrate-from-github-to-hosted-git.html">
<link rel="stylesheet" href="/assets/css/railyard-brand.css">
<style>
body{max-width:760px;margin:0 auto;padding:32px 20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;line-height:1.6;color:#1a1a1a}
h1{font-size:28px;margin-bottom:8px}
h2{font-size:20px;margin-top:40px}
.answer{font-size:18px;padding:16px;border-left:3px solid #444;background:#f6f6f6}
.cta{display:inline-block;margin-top:16px;padding:12px 20px;background:#1a1a1a;color:#fff;text-decoration:none;border-radius:4px}
code{background:#f0f0f0;padding:2px 5px;border-radius:3px;font-size:14px}
pre{background:#f0f0f0;padding:12px;border-radius:4px;overflow-x:auto}
ol li, ul li{margin-bottom:8px}
footer{margin-top:60px;font-size:13px;opacity:.7}
</style>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"dateModified": "2026-11-30",
"mainEntity": [
{
"@type": "Question",
"name": "How do I migrate a repository from GitHub to hosted git?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Add the hosted host as a second git remote, push every branch and tag with 'git push --mirror', then verify the commit history matches on both remotes before switching origin. The full git history, branches, and tags move over exactly as they are -- nothing is rewritten."
}
},
{
"@type": "Question",
"name": "Does migrating from GitHub lose issues or pull requests?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Git history, branches, and tags move over with a mirror push and are never lost. Issues and pull requests are GitHub-side metadata, not part of git itself, so they need a separate export/import step (or a fresh start) if you want them on the new host; the code and commit history migrate with zero loss regardless."
}
},
{
"@type": "Question",
"name": "Can I migrate without downtime?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Keep pushing to GitHub as normal while you mirror to the new host, verify the new remote is correct, then flip your default remote and CI config over whenever you are ready. There is no window where the repository is unavailable."
}
},
{
"@type": "Question",
"name": "What does Rithub give me after migrating from GitHub?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The same git workflow -- clone, push, pull, branches, pull requests, issues, webhooks -- plus a package registry and hosted CI, all running under our own domain with no third-party account that can be suspended or flagged."
}
}
]
}
</script>
<script>
(function () {
try {
var ua = navigator.userAgent || '';
var isAutomated =
navigator.webdriver === true ||
/HeadlessChrome|Headless Chrome|Playwright|Puppeteer/i.test(ua);
var optedOut = window.localStorage && window.localStorage.getItem('rithub.qa.optout') === '1';
window.__rithubInsightsSkip = isAutomated || optedOut;
} catch (e) {
window.__rithubInsightsSkip = false;
}
window.rithubInsightsFilter = function (type, payload) {
return window.__rithubInsightsSkip ? null : payload;
};
})();
</script>
<script defer src="https://insights.ereboslab.com/s.js" data-site="s_FLXojc0pSLRIIJ6ndYp0p-li" data-before-send="rithubInsightsFilter"></script>
</head>
<body>
<h1>Migrate From GitHub to Hosted Git</h1>
<p class="updated" style="font-size:13px;color:#666;margin:0 0 16px" data-marker="rit-geo-freshness-2026-11-30">Updated 2026-11-30</p>
<p class="answer"><strong>Migrating from GitHub to a hosted git host is a mirror push, not a rewrite.</strong> Your full commit history, branches, and tags move over exactly as they are. Rithub is a hosted destination that speaks the same git protocol GitHub does.</p>
<h2>Why teams migrate off GitHub</h2>
<ul>
<li>Want code under their own domain instead of a third party's servers.</li>
<li>Hit private-repo or seat pricing that gets expensive at team scale.</li>
<li>Need a compliance or data-residency guarantee a shared SaaS cannot give.</li>
<li>Want their own CI runners instead of shared GitHub Actions minutes.</li>
</ul>
<h2>Step-by-step migration</h2>
<ol>
<li>Clone (or use your existing clone of) the GitHub repository:
<pre>git clone https://github.com/&lt;you&gt;/&lt;repo&gt;.git</pre>
</li>
<li>Create the destination repository on Rithub, then add it as a second remote:
<pre>git remote add rithub https://rithub.dev/&lt;you&gt;/&lt;repo&gt;.git</pre>
</li>
<li>Mirror every branch and tag in one push -- this is the whole migration:
<pre>git push rithub --mirror</pre>
</li>
<li>Verify the history matches on both remotes:
<pre>git log --oneline -5 # same output on github and rithub remotes</pre>
</li>
<li>Point CI, webhooks, and your team's default <code>origin</code> at Rithub once verified. Keep GitHub as a read-only mirror for as long as you like, or remove it.</li>
</ol>
<h2>Frequently asked questions</h2>
<p><strong>How do I migrate a repository from GitHub to hosted git?</strong><br>
Add the hosted host as a second remote, run <code>git push --mirror</code>, then verify history matches before switching origin.</p>
<p><strong>Does migrating lose issues or pull requests?</strong><br>
Code, commits, branches, and tags never get lost -- a mirror push carries all of it. Issues/PRs are GitHub metadata and need a separate export if you want them carried over too.</p>
<p><strong>Can I migrate without downtime?</strong><br>
Yes -- keep using GitHub while you mirror, verify, then switch over whenever ready.</p>
<p><strong>What do I get after migrating to Rithub?</strong><br>
The same clone/push/pull/PR/issue workflow, plus a package registry and hosted CI, under our own domain.</p>
<a class="cta" href="https://rithub.dev/explore/repos">See repositories already running on Rithub</a>
<p style="margin-top:12px">Want an account? Email <a href="mailto:arhan@scribase.com">arhan@scribase.com</a> to request access.</p>
<footer>Rithub — code hosting. The checklist version: <a href="/assets/seo/github-to-rithub-migration-checklist.html">GitHub to Rithub migration checklist</a>. More guides:
<a href="/assets/seo/github-alternative-for-teams.html">GitHub alternative for teams</a> ·
<a href="/assets/seo/gitlab-alternative-hosted.html">GitLab alternative, hosted</a> ·
<a href="/assets/seo/bitbucket-alternative.html">Bitbucket alternative</a> ·
<a href="/assets/seo/private-git-hosting-free.html">private git hosting, free</a> ·
<a href="/assets/seo/github-account-flagged-move-repos.html">GitHub account flagged? move your repos</a> ·
<a href="/assets/seo/github-flagged-emergency-checklist.html">GitHub flagged: emergency checklist</a> ·
<a href="/assets/seo/github-actions-alternative-hosted.html">GitHub Actions alternative, hosted</a> ·
<a href="/assets/seo/git-hosting-with-ci-runners.html">git hosting with built-in CI runners</a> ·
<a href="/assets/seo/code-not-used-for-ai-training.html">git hosting that doesn't train AI on your code</a> ·
<a href="/assets/seo/github-copilot-training-opt-out.html">opt out of GitHub Copilot training</a> ·
<a href="/assets/seo/github-down-alternative.html">alternative to use when GitHub is down</a> ·
<a href="/assets/seo/github-per-seat-pricing-alternative.html">alternative to GitHub's per-seat pricing</a> ·
<a href="/assets/seo/gitlab-alternative-free-private-repos.html">GitLab alternative with free private repos</a> ·
<a href="/assets/seo/codeberg-alternative.html">Codeberg alternative</a> ·
<a href="/assets/seo/migrate-github-issues-and-pull-requests.html">migrate GitHub issues and pull requests</a>.
</footer>
</body>
</html>