Skip to content
CodeQuay

Migration

From GitHub, GitLab or Bitbucket to CodeQuay, without stopping your CI

The idea in one line: you push only to CodeQuay, and your old platform becomes a copy that updates automatically after every push. Your pipelines stay where they are.

Diagram: developers push to CodeQuay, which enforces protections, secret blocking and audit logging; CodeQuay automatically replicates every push to the old platform (GitHub, GitLab or Bitbucket) within seconds; pipelines run there just as they do today.

How it works

Five steps, zero downtime

Imports and mirrors are managed from the console, or from the command line on the server.

  1. 01

    Authorize the instance key

    On GitHub, GitLab or Bitbucket, add CodeQuay's public key to the repository: read access is enough to import. The private key never leaves the server.

  2. 02

    Import the repository

    Every branch and every tag, the default branch already protected, indexes ready for fast browsing. If it's interrupted, run it again and it picks up where it left off.

  3. 03

    Check the history for secrets

    The import scans the entire history and reports the type, file, line and commit of every potential secret, without ever showing its value.

  4. 04

    Turn on the mirror back

    From then on, every push CodeQuay accepts is replicated to the old platform within seconds, and your CI runs just like today.

  5. 05

    Switch the remote. That's it

    For developers it's a single command per clone: the history is identical, nothing to download again.

Import

Bring your full history, and know what's in it

The import runs over SSH and copies every branch and every tag (not pull requests, merge requests, issues or wikis), protects the default branch and scans the entire history for private keys and tokens.

  • Secrets it finds have already been exposed: they need to be rotated, deleting them from the code isn't enough
  • From then on, secret blocking stops new ones from getting back in
  • Safe to re-run: if it's interrupted it resumes and catches up, without overwriting new work
Example of the CodeQuay console importing a repository from GitHub: import completed with 14 branches and 38 tags; the history scan found 2 potential secrets to rotate, listed by file, line and commit, without showing their value.

Platforms

GitHub, GitLab or Bitbucket

The import works the same way from all three, over SSH only. CodeQuay pins the host keys published by GitHub, GitLab and Bitbucket: no trust on first use.

  • GitHub

    Repository URL
    git@github.com:acme/api.git
    Key for the import
    Repository Settings → Deploy keys. Read access is enough.
    Mirror back
    A deploy key with “Allow write access”.
  • GitLab

    Repository URL
    git@gitlab.com:acme/backend/api.git
    Key for the import
    Project Settings → Repository → Deploy keys. Read access is enough.
    Mirror back
    A deploy key with “Grant write permissions to this key”. If the branch is protected, allow the deploy key under “Allowed to push and merge”.

    Self-managed GitLab too: the host and its host keys are added to the server configuration. On a dedicated instance your administrator does it; on git.codequay.it, on request.

  • Bitbucket

    Repository URL
    git@bitbucket.org:acme/api.git
    Key for the import
    Repository settings → Access keys. Read access is enough.
    Mirror back
    Bitbucket access keys are always read-only: the mirror's key goes on an account with write access to the repository, under Personal settings → SSH keys. Best to use a dedicated account with access to that repository only.

    Bitbucket Cloud (bitbucket.org) only. From Bitbucket Data Center or Server, migrate with standard git.

Example of the CodeQuay console, a repository mirror to GitHub: in sync, last successful sync 40 seconds ago, with the toggle on and a Sync now button.

Mirror back

Your CI stays put, for as long as you want

New and updated branches, new tags, deleted branches: everything is replicated to GitHub, GitLab or Bitbucket a few seconds after the push to CodeQuay.

Whenever you're ready, your workflows can move to CodeQuay Actions, with the same syntax as GitHub Actions. CodeQuay Actions

  • Workflows run just like today

    Replicated pushes are real pushes to the remote repository, so they trigger push-based pipelines on GitHub Actions, GitLab CI/CD or Bitbucket Pipelines.

  • Secrets and environments stay put

    No CI configuration to move before you get started.

  • If the remote doesn't respond, CodeQuay retries

    With increasing back-off, and it alerts admins on the first failure and again on recovery. Developers' pushes aren't affected.

  • Your old platform becomes a copy

    You push only to CodeQuay; with a ruleset on GitHub, or protected branches on GitLab, only CodeQuay's deploy key can write.

For developers

One command, then back to coding

Branches, tags, commits and hashes stay the same. Only the remote URL changes, and from then on protections, secret blocking and the audit log work for you.

Coming from another git server, such as Bitbucket Data Center, Gitea or a plain git server? It's standard git: a git push --mirror is all it takes. And you can leave the same way, with a git clone --mirror.

in an existing clone
Commands for developers: point the remote to CodeQuay over HTTPS or SSH, then run git fetch.
# HTTPS (with a CodeQuay personal token)$ git remote set-url origin https://git.codequay.it/acme/portale/api.git# or SSH (with a key registered in the console)$ git remote set-url origin ssh://git@git.codequay.it:2222/acme/portale/api.git$ git fetch origin
from another git platform
Commands to migrate from another platform: mirror clone, remove the refs/pull and refs/merge-requests references, mirror push to CodeQuay.
$ git clone --mirror https://current-server.example/acme/api.git$ cd api.git# only if present: drop pull request and merge request refs$ git for-each-ref --format='delete %(refname)' refs/pull refs/merge-requests |    git update-ref --stdin$ git push --mirror https://git.codequay.it/acme/portale/api.git

Ready to bring your repositories to CodeQuay?

Create your account, start free and begin with an import. Want to know if it's right for your team, or need a dedicated instance? Get in touch.