Your Code. Your Rules.

Repository Migration

Migrating a Repository to git.eu

This guide covers how to migrate an existing repository from GitHub, GitLab, or any Git host to git.eu, preserving all branches, tags, and history.


Prerequisites

  • A git.eu account with an existing empty repository created at https://git.eu/{username}/{repo}.git
  • Git installed locally (2.30+ recommended for full mirror support)

Method Comparison

MethodSpeedCompletenessRequires Server Access
Mirror via local cloneMediumFullNo
Direct file copy (rsync)FastFullYes
Re-push from existing cloneMediumPartialNo

Method 1 - Mirror via Local Clone (recommended)

Best for most cases. Downloads the full repo locally, then pushes everything to git.eu.

Step 1 - Clone as mirror

git clone --mirror https://github.com/USERNAME/REPO.git

This creates a bare repository REPO.git/ containing all branches, tags, and refs - no working tree.

Replace github.com with your source host: gitlab.com, bitbucket.org, or any self-hosted Git server URL.

Step 2 - Enter the repo

cd REPO.git

Step 3 - Set git.eu as the destination

git remote remove origin
git remote add origin https://git.eu/USERNAME/REPO.git

You may see a warning about branches outside refs/remotes/ not being deleted. This is harmless - the mirror is complete.

Step 4 - Push everything

git push --mirror origin

Enter your git.eu credentials when prompted. All branches, tags, and refs are pushed in one operation.

Step 5 - Save credentials (optional)

To avoid re-entering credentials on future pushes:

git config --global credential.helper store
git push origin

Credentials are saved automatically after the first successful authentication.


Method 2 - Direct File Copy (fastest for large repos)

If you have filesystem access to both servers, skip the Git protocol entirely. A bare repo is just files.

rsync -av /path/to/source/REPO.git/ user@git.eu-server:/srv/git.eu/data/git-backend/REPO_UUID.git/

Replace REPO_UUID with the internal UUID assigned by git.eu when you created the repository (visible in the server's git-backend data directory).

This is the fastest method for large repositories - no pack negotiation, no HTTP overhead, raw disk speed.


Method 3 - Re-push from an Existing Local Clone

If you already have a local clone of the repository:

cd /path/to/existing/clone

# Add git.eu as a new remote
git remote add giteu https://git.eu/USERNAME/REPO.git

# Push all branches
git push giteu --all

# Push all tags
git push giteu --tags

This method may miss some refs (stash, notes, etc.). Method 1 is more complete.


Verify the Migration

After pushing, confirm all branches and tags arrived:

# List remote branches
git ls-remote --heads origin

# List remote tags
git ls-remote --tags origin

Or browse the repository on git.eu to confirm the branch list and commit history.


Troubleshooting

HTTP 413 - Request Entity Too Large

The server rejected the push because the repository exceeds the size limit (2 GB). Contact the server administrator.

RPC failure / curl 65 - Connection reset

error: RPC failed; curl 65 Recv failure: Connection reset by peer

The push likely succeeded - Git lost the response but the data landed. Run git push again; if it prints Everything up-to-date, the migration is complete.

If it fails repeatedly, increase the client buffer:

git config --global http.postBuffer 524288000

Then retry.

Large repository is slow over HTTP

Use Method 2 (direct file copy) if you have server access - it is significantly faster than HTTP for repositories above ~500 MB.


Next Steps