Gitea Multi-Mirrorer is a Python script that allows you to mirror repositories from GitHub, GitLab, or any Gitea instance to your specified Gitea instance. This tool is useful for creating backups or maintaining mirrors of repositories across different platforms.
- Mirror repositories from GitHub, GitLab, and Gitea instances
- Support for GitLab groups and users
- Automatic handling of pagination for large numbers of repositories
- Configurable through environment variables
- Python 3.6+
requests
librarypython-dotenv
library
- Clone this repository or download the script.
- Install the required libraries: pip install requests python-dotenv
- Create a
.env
file in the same directory as the script with the following content:
GITEA_TOKEN=your_gitea_api_token
GITEA_INSTANCE_URL=https://your.gitea.instance
Replace your_gitea_api_token
with your Gitea API token and https://your.gitea.instance
with the URL of your Gitea instance.
Run the script using Python:
python gitea_multi_mirrorer.py
The script will prompt you for:
- The profile URL of the repositories you want to mirror (GitHub, GitLab, or Gitea)
- The Gitea organization or username that will own the mirrored repositories
The script will then create mirrors of all repositories found at the given profile URL in your specified Gitea instance.
- For GitLab, both user profiles and group URLs are supported.
- For Gitea instances, the script assumes a standard API structure. Some instances may require authentication for API access.
- The script uses the name format
{original_owner}.{repo_name}
for mirrored repositories to avoid naming conflicts.
Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.