Skip to content
All docs

Docs / Bring your code

Moving from GitHub or GitLab

This guide is one path from a project on GitHub (or GitLab) to the same project on Dash Forge, with its code, issues, pull requests, releases and labels, and your collaborators. It links the other guides in the order you need them, and says plainly what Forge doesn't do yet.

You don't have to move everything at once. Most projects start as a mirror, where GitHub stays the home and Forge follows it, and cut over later, or never. Both are covered.

Start here: the mirror wizard

Open forge.dashhq.org/mirror (or New → Mirror a GitHub repo). It asks whether you maintain the repository on GitHub, then offers two ways:

  • Automatic sync, for people with write access on GitHub. Sign in here and create or reuse a Forge repository. Set up the GitHub Action now, or leave it for later. Its storage, runner key and workflow steps are optional.
  • From the command line, for anyone who may copy the source. The wizard fills in commands for dg on your computer, with a repo name and spending cap you can change. You need dg, git-remote-dash, the GitHub CLI signed in, and a funded identity. The page signs nothing.

The setup wizard guide walks through both ways. Automatic setup resumes from this identity's saved browser answers; command-line settings resume from the page address. No key is saved. The wizard's workflow builds the Action's tools on the runner from the commit the site runs, which can be ahead of the latest release, so the first run takes several extra minutes.

The rest of this guide covers the command-line path: private repositories, GitLab, a one-off import with no Action, and cutting over.

  1. What moves and what doesn't
  2. Pick where the code is stored
  3. Get and fund an identity
  4. Import the repository
  5. Keep it in sync
  6. Cut over, or stay on both
  7. Invite collaborators
  8. CI
  9. What it costs
  10. GitHub features with no Forge equivalent

Replace every <…> placeholder with your own value. Forge runs on testnet, where Dash is free (Which network).


1. What moves and what doesn't

On GitHubOn ForgeHow
Branches, tags, full historyBranches, tags, full history (commit ids unchanged)forge-import, or plain git push
Issues and their commentsIssues at the same numbers, with comments, labels and open/closed stateforge-import
Pull requestsPRs at the same numbers: title, body, base, head commit, state (open, closed, merged, draft), labels, comments, reviews. The head of each open PR as refs/mirror/pull/<n>/headforge-import
ReleasesTag, title and notes. Each asset is recorded by its GitHub URL and SHA-256; the file is not copiedforge-import
LabelsLabel definitions, and each item's labelsforge-import
CollaboratorsWriters and maintainers, by Dash identitydg collab add (§7)
Branch protection, required reviewsProtected branches (enforced by Dash Platform and Forge apps) and a branch policy (enforced by Forge apps)dg repo protect, dg repo policy
WebhooksGitHub-shaped webhooks, delivered by a relay you rundg webhook add (§8)

Imported items are written by your identity and name their GitHub author (how). Some things are not imported: see Not mirrored and §10.

Public by default. Everything you import is published on Dash Platform, permanently, and can't be deleted: issues and PRs by design, packs because others depend on them. Import only what you are happy to publish forever. GitLab's members-only content is refused unless you pass --include-members-only, and internal comments and confidential issues are never imported (GitLab guide). The importer creates public repositories. To import into a private one, create it first with dg repo create --private <name> and pass --repo <name>. Its releases are then sealed: their tags, names, notes, source links and asset lists are encrypted, and each asset the importer can download is encrypted and stored on your own storage (the storage policy you set for the packs), so a private import with releases needs storage of your own. Storage still shows each asset's exact size, which can identify the public release it mirrors. Label definitions are left out unless you pass --include-label-definitions (Private repositories).

2. Pick where the code is stored

Forge hosts nothing. Pack bytes (the git objects) go to storage you choose, and only small signed records go on Platform. Decide this before you import: the import pushes the whole history, and storing it on Platform is priced per byte and permanent (Platform or your own bucket).

OptionGood forGuide
Cloudflare R2most projects: no egress fees, a free tierR2
Backblaze B2, AWS S3, Storjan account you already haveB2, S3, Storj
A NAS at homeno storage bill; needs a second copy for when it's offHome NAS
IPFS (kubo, a pinning service)content addressing, many readersIPFS
Dash Platformtiny repositories; no account needednothing to set up

Set it up and make it your global default:

dg storage add                          # asks for each value, stores the secret in your keychain, tests it
dg storage test <profile>               # every row OK, including "browser CORS"
dg storage use <profile> --global       # two places for anything you care about: dg storage use r2-main,nas --global

--global matters: forge-import pushes through git-remote-dash, which reads the global dash.storage. A repository can override it later with its own dg storage use (without --global), run inside that clone.

3. Get and fund an identity

A Dash identity is your account. You create it yourself by locking some Dash. Nobody issues it, and Forge never creates or funds one for you.

dg auth new

dg shows a 12-word recovery phrase (write it down), then a deposit address. Fund it from any Dash wallet; on testnet, use the Dash testnet faucet or faucet.thepasta.org. How much you need depends on the repository: forge-import --dry-run in the next step tells you. Quick start §2–3 has the details, and Identity and keys covers backups and top-ups.

4. Import the repository

Install the importer (quick start §1 installs dg and git-remote-dash from a source clone), and sign in to GitHub so it can read issues, PRs and releases:

# From the source clone of the quick start. Or the install script fetches it from the latest
# release (DASH_FORGE_BINARIES="dg git-remote-dash forge-import", see INSTALL.md).
cargo install --locked --path crates/forge-import
gh auth login

The standalone forge-import does not read dg's saved identity or network, so give it both. dg import <owner>/<repo> is the same engine with dg's defaults, if you prefer.

export DASH_FORGE_KEY=keychain:dash-forge/testnet/<your identity id>   # the key dg auth stored

(If dg auth status says the key is in a passphrase-encrypted file, use that file's path instead, and set DASH_FORGE_PASSPHRASE. forge-import is built to run unattended, so it never asks for the passphrase, even in a terminal.)

Price it first. A dry run reads everything and writes nothing:

forge-import alice/project --network testnet --dry-run
github.com/alice/project → dash://5NGj…/project (testnet)
  would write: 26 ref updates · 2 packs (794.4 KiB) · 1 issues · 36 PRs · 205 comments · 81 reviews · 32 events · 0 releases · 9 labels
  estimate: 0.436514 DASH (dry run: nothing written)

Try a few items, then look at the result on the web:

forge-import alice/project --network testnet --limit 5 --max-spend 0.1 --yes --i-have-the-rights

Then import everything, with a cap a little above the estimate and a state file for later runs:

forge-import alice/project --network testnet \
  --max-spend 0.5 --state ./project.sync.json --yes --i-have-the-rights --summary-json ./import.json

--i-have-the-rights says you may publish what you are importing: a real run needs it (or a "y" at a terminal), and prints the licence the source reports first. --yes only confirms the cost. A dry run needs neither.

--max-spend is a hard cap: the importer refuses to start above it and stops before the write that would cross it; a re-run with a higher cap finishes the job without writing anything twice. The GitHub mirror guide lists every flag and how a run ends. For GitLab, name the project as gitlab.com/<group>/<project> with a GITLAB_TOKEN (GitLab guide).

Check it. A commit id is a hash of the commit and all its history, so equal tips mean identical history:

git ls-remote dash://<your id>/project refs/heads/main
git ls-remote https://github.com/alice/project refs/heads/main     # the same id
dg pr list <your id>/project --state all
dg storage status <your id>/project                                 # every copy of every pack answers

Then open https://forge.dashhq.org/<your id>/project. Run dg storage advertise <your id>/project once, so readers and the web app know where the packs live.

5. Keep it in sync

While GitHub is still where work happens, let Forge follow it with the Forge Mirror Action: the same importer, run from GitHub Actions on every push, issue, PR and release and on a daily schedule, under a per-run cost cap. The mirror wizard sets it up from the browser. To set it up by hand, see Mirror a GitHub repository §2. Its CI secret is a limited key, never your identity file:

dg auth export --new-key --master dash-identity-<id>.json \
  --budget 0.5 --expires 365d --format dfk1 --reveal-secrets -o runner.dfk1

For GitLab, use the CI template.

6. Cut over, or stay on both

Stay on both (dual-home)

Keep GitHub as the place people push and file issues, and keep the Mirror Action running. Forge then holds a copy nobody can take down, and readers can use either. This is the right choice while contributors, CI and integrations still live on GitHub.

In your own checkout, add Forge as a second remote so you can read from it:

git remote add forge dash://<your id>/project
git fetch forge

Only one side should take writes. If people push to both, the mirror will overwrite Forge's branches with GitHub's on its next run.

Cut over

When Forge becomes the home:

  1. Stop the mirror. Delete the workflow file (or disable it in the Actions tab), then run one last forge-import so the final issues and comments are there.
  2. Freeze GitHub. Archive the GitHub repository (Settings → Archive this repository), or at least protect every branch, so nothing lands there that Forge won't see. Put the new address at the top of the README:
    > This project moved to Dash Forge: https://forge.dashhq.org/<your id>/project
    > Clone: `git clone dash://<your id>/project` (needs [git-remote-dash](https://github.com/PastaPastaPasta/dash-forge/blob/master/docs/INSTALL.md))
  3. Point your checkout at Forge:
    git remote rename origin github
    git remote add origin dash://<your id>/project
    git fetch origin
    git branch -u origin/main main
    git push                                # plain git from now on
  4. Tell contributors how to get set up: install dg and git-remote-dash, dg auth new, then dg repo clone <your id>/project. Reading and cloning need no identity; pushing, issues and reviews do.

A DPNS username makes addresses readable: dg auth name register <label>, then dash://<label>/project and forge.dashhq.org/<label>/project work everywhere. Names of 3–19 characters made only of a–z, 0, 1 and - are contested and refused, so pick one with another digit or longer than 19 characters (for example alice-project2); see Identity and keys.

7. Invite collaborators

Each collaborator needs their own Dash identity (dg auth new) and sends you its id (dg auth status shows it). Then:

dg collab add <your id>/project <their identity id> --role writer       # or --role maintainer
dg collab list <your id>/project
GitHub roleForge role
Writewriter
Maintain / Adminmaintainer
Triage, Readnone needed: anyone can open issues and PRs, comment and review

Collaborating says what each role can do. Only the repository's owner can add or remove members, and consensus enforces it.

A collaborator then clones and pushes with plain git. If your storage is a bucket, they need write access to it too: give them their own key for the same bucket, which they add with dg storage add and dg storage use. Or they can push to a bucket of their own. Readers find every pack through its on-chain manifest, wherever it is stored.

dg repo clone <your id>/project && cd project
git switch -c fix-typo && git commit -am "Fix a typo"
git push -u origin fix-typo
dg pr create <your id>/project --body "Fixes the README"

To replace GitHub's branch protection:

dg repo protect defaults <your id>/project                        # only maintainers move main and tags (Platform enforces it; new repositories start this way)
dg repo policy set <your id>/project --required-approvals 1       # Forge apps hold the merge until approved

8. CI

What exists today, and what doesn't:

  • Webhooks: yes. GitHub-shaped webhooks, delivered by a relay you run, so a CI system that takes GitHub webhooks can build from Forge (Webhooks and CI).
  • Showing check results: yes. A checkRun document records a named check on a commit (queued, in progress, completed; success or failure). dg pr checks and the web's PR page show them, the relay delivers them as check_run webhooks, and a branch policy can require them (dg repo policy set … --require-checks true).
  • Writing check results: yes, with dg ci. dg ci runner new gives a runner identity a key that can only post check runs and enrols it in the repository. dg ci report <owner>/<repo> --sha <commit> --name build --status completed --conclusion success writes a check run from any CI, with an optional log and artifacts stored in your own storage. See CI and check runs.
  • A runner: one you run yourself. Forge hosts no CI. forge-runner runs a repository's .forge/workflows/*.yml (GitHub Actions syntax) with nektos/act in Docker, on push and pull_request, and reports each job as a check run. Your .github/workflows files do nothing on Forge until you copy them to .forge/workflows. It has no schedule or workflow_dispatch triggers (what it does not do).

What people do today:

  • Keep CI on GitHub while dual-homed (§6). The check action reports each GitHub Actions job as a Forge check run on the same commit.
  • After a cut-over, run forge-runner, or point a CI system that takes webhooks (Jenkins, Buildkite, Woodpecker, your own) at a relay, have it clone with git clone dash://…, and report back with dg ci report.

9. What it costs

Forge takes nothing. You pay Platform fees from your identity's credits, and your storage provider's bill. What things cost has every measured figure, including a first mirror run, a push to your own storage and a push to Platform. For a migration:

  • The import costs what forge-import --dry-run says. Most of it is one document per issue, PR, comment and review.
  • Later pushes cost the per-push figure in Costs for where your packs live.
  • A Mirror Action re-run with nothing new costs nothing.

For example, the dry run of a repository with about 800 KiB of packs, 36 PRs, 205 comments and 81 reviews, with packs on the owner's own storage, was priced at 0.44 DASH. Almost all of that was the discussion history; the git part was 0.02 DASH. The same packs on Platform would have added about 0.27 DASH (see Costs).

10. GitHub features with no Forge equivalent

GitHubOn ForgeWhat to do instead
Actions (CI/CD runners)No hosted runners; a runner you host yourself (forge-runner)See §8
DiscussionsNoneIssues with a discussion label
WikiNoneA docs/ folder in the repository; the web app renders Markdown
GitHub PagesNone: Forge serves no user contentServe the site from your own bucket and domain (R2 and S3 host static sites)
Packages (npm, containers)NonePublish to the usual registries, or attach build outputs to a release (dg release create --asset)
Projects / boardsNoneLabels, and dg issue list --label … --assignee … filters
MilestonesSupported (dg milestone, and Issues → Milestones on the web), but the importer does not bring them overRe-create the ones you need (Milestones) and set them with dg issue milestone
Issue and PR templatesSupported on the web: Markdown templates, YAML issue forms and config.yml from .github/ISSUE_TEMPLATE/ (or .gitlab/issue_templates/), and pull_request_template.md / PULL_REQUEST_TEMPLATE/ (or GitLab's merge request templates). A form's assignees are not applied, and dg does not read templatesNothing: they are read from the repository (Issue and PR templates)
ReactionsNone: each one would be a paid documentA comment, or a review approval
Verified commitsSupported for Ed25519 SSH and Ed25519/ECDSA OpenPGP keys you publish on your profile; RSA keys don't fitdg profile key add (Signed commits)
AssigneesNot imported; you can assign on Forge (dg issue assign)Re-assign open items after the import
CODEOWNERSRead from the base branch; new PRs ask the owners for review (Code owners). Teams and e-mail owners are not asked, and @login is read as a DPNS name. "Require review from code owners" is a branch rule: dg repo policy set --require-code-owners true, or Settings → Branches (Requiring a code owner's approval)Name people by DPNS name or identity id
Organizations and teamsRepositories belong to one identity; members are per repositoryA shared maintainer identity, or add each person to each repository
Transferring a repositoryNot possible: the owner is fixedCreate a repository under the new owner and push to it (history is unchanged)
Deleting a repository, issue or PRNot possible: they are permanentArchive the repository (dg repo archive), close issues and PRs
Git LFSNot supportedKeep large binaries out of git; attach them to releases, which go to your storage
https:// clone URLs, shallow clonesdash:// only (needs git-remote-dash); no --depth (E205)git clone --filter=blob:none for a light clone; the web app offers a zip of any branch
Email notificationsNone: there is no server to send themThe web app's Notifications, or a webhook to your own notifier
Code searchWithin one repository, in the web app: built in your browser from the repository's files, the default branch only for a large repository (Search the code). No search across repositories: that needs an indexer, and Forge runs nonegit grep in a clone
Secret scanning, DependabotNoneRun those tools locally or in your own CI
Private repositories in the web appThe web app reads private repositories and writes their issues, PRs and reviews, but can't merge PRs or commit to branches in them yetUse dg for those

The FAQ has more on what Forge is and isn't.

This page is docs/guides/moving-from-github.md from the Dash Forge repository, as of this build. View or edit it on GitHub