{"id":25422238,"url":"https://github.com/janyksteenbeek/gitcloner","last_synced_at":"2026-04-12T17:48:52.763Z","repository":{"id":277855106,"uuid":"933726560","full_name":"janyksteenbeek/gitcloner","owner":"janyksteenbeek","description":"Easily mirror / backup all your repositories to a different provider for data safety","archived":false,"fork":false,"pushed_at":"2025-02-16T17:59:14.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T08:03:55.792Z","etag":null,"topics":["clone","git","gitea","github","gitlab","mirror"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janyksteenbeek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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,"zenodo":null},"funding":{"github":["janyksteenbeek"]}},"created_at":"2025-02-16T15:00:37.000Z","updated_at":"2025-02-16T18:05:59.000Z","dependencies_parsed_at":"2025-02-16T16:34:44.630Z","dependency_job_id":"b7b022e9-0124-4caa-b1db-6d6def9805af","html_url":"https://github.com/janyksteenbeek/gitcloner","commit_stats":null,"previous_names":["janyksteenbeek/gitcloner"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/janyksteenbeek/gitcloner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janyksteenbeek%2Fgitcloner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janyksteenbeek%2Fgitcloner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janyksteenbeek%2Fgitcloner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janyksteenbeek%2Fgitcloner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janyksteenbeek","download_url":"https://codeload.github.com/janyksteenbeek/gitcloner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janyksteenbeek%2Fgitcloner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267645925,"owners_count":24120893,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-02-16T21:24:01.112Z","updated_at":"2026-04-12T17:48:52.722Z","avatar_url":"https://github.com/janyksteenbeek.png","language":"Go","funding_links":["https://github.com/sponsors/janyksteenbeek"],"categories":[],"sub_categories":[],"readme":"# Gitcloner\n\nEase of mind when it comes to your data safety. Easily mirror your repositories to a different provider. \n\nBy hooking Gitcloner as a global webhook into your source provider, it will start listening for events. When it detects a new repository, it will create a mirror of your repository on the destination provider. It will also keep the mirror up to date when there are push events to the original repository, or when the mirror repository is updated.\n\n## Features\n\n- Automatically creates mirror repositories when new repositories are created\n- Syncs repositories on push events to the default branch\n- One-time import of repositories using the CLI\n- Supports mirroring to:\n  - Gitea\n  - GitHub\n  - GitLab\n- Prefixes mirrored repositories with original owner name\n- Handles private repositories with authentication\n- Docker support for easy deployment\n- Automatically updates mirrors when the original repository is updated\n\n## Usage\n\n### Webhook Server\n\nThe default mode runs a webhook server that listens for repository events and automatically creates/updates mirrors.\n\n```bash\n./gitcloner\n```\n## Deployment Options\n\n### Using Docker (Recommended)\n\n1. Pull the image from GitHub Container Registry:\n   ```bash\n   docker pull ghcr.io/janyksteenbeek/gitcloner:latest\n   ```\n\n2. Create a `.env` file with your configuration:\n   ```bash\n   cp .env.example .env\n   ```\n\n3. Run with Docker Compose:\n   ```bash\n   docker-compose up -d\n   ```\n\n### Manual Deployment\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/janyksteenbeek/gitcloner.git\n   cd gitcloner\n   ```\n\n2. Copy and configure environment variables:\n   ```bash\n   cp .env.example .env\n   ```\n\n3. Build and run:\n   ```bash\n   go build ./cmd/gitcloner\n   ./gitcloner\n   ```\n\nInstall Supervisor to run the service in the background. More info [here](https://google.com/search?q=How+to+install+supervisord).\n\n## Configuration\n\n### Environment Variables\n\n- `PORT`: The port the webhook server will listen on (default: 8080)\n- `DESTINATION_TYPE`: Either \"gitea\", \"github\", or \"gitlab\"\n- `DESTINATION_URL`: The URL of your destination instance\n- `DESTINATION_TOKEN`: API token with repository creation permissions\n- `DESTINATION_ORG`: The organization/owner name where mirrors will be created\n- `SOURCE_TOKEN`: Token for accessing private source repositories\n- `ALWAYS_PUSH`: Whether to push to the destination even if the mirror already exists. By default, this is ommited.\n\n### Webhook Configuration\n\n#### Gitea\nIn Gitea organization settings, add a Gitea webhook with:\n- URL: `http://your-server:8080/webhook`\n- Method: POST \n- Events: Repository Created, Push\n- Branch filter: *\n\n#### GitHub\nIn GitHub organization settings, add webhook with:\n- URL: `http://your-server:8080/webhook`\n- Content type: `application/json`\n- Events: Repository, Push\n\n#### GitLab\nIn GitLab group settings, add webhook with:\n- URL: `http://your-server:8080/webhook`\n- Triggers: Project events, Push events\n- SSL verification: Optional\n\n## One-time Import\n\nYou can use Gitcloner to import one or more repositories using the CLI:\n\n```bash\n# Mirror multiple GitHub repositories\n./gitcloner --import \"github octocat/Hello-World,golang/go,kubernetes/kubernetes\"\n\n# Mirror a GitLab repository\n./gitcloner --import \"gitlab gitlab-org/gitlab\"\n```\n\nThe import command requires:\n1. The `--import` flag\n1. Platform name (`github`, `gitlab`, or `gitea`)\n3. One or more repository paths in `username/repo` format, separated by commas\n\nNote: When importing multiple repositories, if one import fails, the process will continue with the remaining repositories.\n\nMake sure you have valid environment variables in the `.env` file\n\n\n## Repository Naming\n\nMirrored repositories are created with the format: `originalOwner-repoName`\nExample:\n- Original: `janyksteenbeek/myrepo`\n- Mirrored: `yourbackuporg/janyksteenbeek-myrepo`\n\n### Private Access Tokens\n\nFor private repositories, you need to set the `SOURCE_TOKEN` environment variable. This token needs to have access to the private repositories you want to mirror.\n\nMake sure the token has the necessary permissions for the source provider. Read more about the permissions needed in the documentation of the source provider. Most of the times, it's just a matter of read/write access to the repositories and organizations \u0026 users scopes.\n\n## License\n\nLicensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanyksteenbeek%2Fgitcloner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanyksteenbeek%2Fgitcloner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanyksteenbeek%2Fgitcloner/lists"}