{"id":15766909,"url":"https://github.com/pygitmirror/pygitmirror","last_synced_at":"2026-02-06T13:17:06.992Z","repository":{"id":257808841,"uuid":"866228551","full_name":"pygitmirror/pygitmirror","owner":"pygitmirror","description":"A python package for mirroring git repositories between two git servers","archived":false,"fork":false,"pushed_at":"2024-10-04T01:40:35.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-10T13:05:37.335Z","etag":null,"topics":["clone","git","gitea","github","gitlab","mirror"],"latest_commit_sha":null,"homepage":"https://github.com/pygitmirror/pygitmirror","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pygitmirror.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-01T21:43:33.000Z","updated_at":"2024-10-04T01:40:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"3efd7cbc-5138-4071-b1b7-40af5b442155","html_url":"https://github.com/pygitmirror/pygitmirror","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"cd0a69fba6df419bccd4c5a1dea392bbc82d95c0"},"previous_names":["pygitmirror/pygitmirror"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pygitmirror/pygitmirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygitmirror%2Fpygitmirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygitmirror%2Fpygitmirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygitmirror%2Fpygitmirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygitmirror%2Fpygitmirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pygitmirror","download_url":"https://codeload.github.com/pygitmirror/pygitmirror/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pygitmirror%2Fpygitmirror/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266151524,"owners_count":23884436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clone","git","gitea","github","gitlab","mirror"],"created_at":"2024-10-04T13:03:27.212Z","updated_at":"2026-02-06T13:17:01.930Z","avatar_url":"https://github.com/pygitmirror.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Mirror\n\n[![PyPi Badge](https://img.shields.io/pypi/v/pygitmirror)](https://pypi.org/project/pygitmirror/)\n![Publish](https://github.com/pygitmirror/pygitmirror/workflows/Publish/badge.svg)\n![Test](https://github.com/pygitmirror/pygitmirror/workflows/Test/badge.svg)\n[![Downloads](https://static.pepy.tech/personalized-badge/pygitmirror?period=week\u0026units=international_system\u0026left_color=black\u0026right_color=orange\u0026left_text=Last%20Week)](https://pepy.tech/project/pygitmirror)\n[![Downloads](https://static.pepy.tech/personalized-badge/pygitmirror?period=month\u0026units=international_system\u0026left_color=black\u0026right_color=orange\u0026left_text=Month)](https://pepy.tech/project/pygitmirror)\n[![Downloads](https://static.pepy.tech/personalized-badge/pygitmirror?period=total\u0026units=international_system\u0026left_color=black\u0026right_color=orange\u0026left_text=Total)](https://pepy.tech/project/pygitmirror)\n\n`git-mirror` is part of the `pygitmirror` Python package. `git-mirror` is an executable to clone git repos from one git server to another.\n\n## Installation\n\nTo install `pygitmirror` into your Python environment:\n\n    pip install -U pygitmirror\n\nThe package exposes a single executable `git-mirror` which is used to systematically mirror your git repos from one `git` server to another.\n\n## Usage\n\nAfter installing `pygitmirror`, you can call the `git-mirror` executable to clone/mirror your `git` repository between two git servers:\n\n    git-mirror --source_url \u003csource git server URL\u003e --destination_url \u003cdestination git server URL\u003e --org \u003corganization or project name\u003e --repo \u003crepo name\u003e\n\n`git-mirror` will use the current directory to check out your source repository and pushes **all branches** in it to its new location at the destination. Note, the destination repository needs to **_already exist_** at the destination server, albeit being empty!\n\nTo use a custom sync/temporary path:\n\n    git-mirror --sync_path \u003ccustom sync path\u003e ..\n\nTo mirror multiple repositories at once, you should use the `JSON` file option:\n\n```json\n{\n  \"sync_path\": \"\u003clocal path for sync\u003e\",\n  \"source_url\": \"ssh://\u003csource-git-server\u003e:\u003csource port\u003e or https://\u003csource-server\u003e\",\n  \"destination_url\": \"ssh://\u003cdestination-git-server\u003e or https://\u003cdestination-server\u003e\",\n  \"repos\": {\n    // comments are allowed at the beginning\n    \"organization-1\": [\n      // comments are allowed at the beginning\n      \"repo-1\",\n      \"repo-2\",\n      \"...\"\n    ],\n    \"organization-2\": [\"repo-3\", \"repo-4\", \"...\"]\n  }\n}\n```\n\nNote: `JSON` file entries supersede the other command line arguments.\n\nTo get a list of all available parameters:\n\n    git-mirror -h\n\n## Development\n\nTo clone the library for development:\n\n    git clone https://github.com/pygitmirror/pygitmirror.git\n\nor\n\n    git clone git@github.com:pygitmirror/pygitmirror.git\n\n### Build The Virtual Environment\n\nThe current earliest Python version supported is `3.9`. You need to be able to create a virtual environment at this version to make sure any changes you make is compatible.\n\nIf you are using `conda`:\n\n    conda create --prefix=.venv python=3.9 --yes\n\nIf you are using `venv`, make sure you have the right base package:\n\n    \u003e\u003e python --version\n    Python 3.9.x\n\nOnce you verify your base Python, you can then create a virtual environment using:\n\n    virtualenv -p py3.9 .venv\n\n### Setup\n\nOnce you have created your virtual environment and made sure it is active in your current command line:\n\n    python3 -m pip install --upgrade pip\n    pip install -e .[dev]\n\nThis should all the dependencies you need for developing into the library and also allow you to run the unit tests:\n\n    pytest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpygitmirror%2Fpygitmirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpygitmirror%2Fpygitmirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpygitmirror%2Fpygitmirror/lists"}