{"id":16780285,"url":"https://github.com/tobiashuste/mirroring-example","last_synced_at":"2026-01-03T10:19:42.059Z","repository":{"id":89762630,"uuid":"98966951","full_name":"tobiashuste/mirroring-example","owner":"tobiashuste","description":null,"archived":false,"fork":false,"pushed_at":"2017-08-15T11:41:06.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T06:44:27.793Z","etag":null,"topics":["gitlab","gitlab-ce","gitlab-ci","mirroring"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobiashuste.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":"2017-08-01T06:22:16.000Z","updated_at":"2017-08-01T08:39:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"692a0038-40e0-48e4-b300-581586f80280","html_url":"https://github.com/tobiashuste/mirroring-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiashuste%2Fmirroring-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiashuste%2Fmirroring-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiashuste%2Fmirroring-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiashuste%2Fmirroring-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobiashuste","download_url":"https://codeload.github.com/tobiashuste/mirroring-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926070,"owners_count":20369910,"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":["gitlab","gitlab-ce","gitlab-ci","mirroring"],"created_at":"2024-10-13T07:34:37.878Z","updated_at":"2026-01-03T10:19:42.019Z","avatar_url":"https://github.com/tobiashuste.png","language":null,"readme":"# Sample project to demonstrate project mirroring using GitLab CI\n\nIf you host your main repository elsewhere and would like to use e.g.\nGitLab-CI for testing, you would wish to have an option to mirror your\nrepository easily with your GitLab-instance. Unfortunately, the mirroring\nfeature is only integrated natively in the Enterprise Edition of GitLab\nso far. One of the ways of setting up automated mirroring also in the Community\nEdition is using GitLab-CI for it.\n\n## How does it work\n\n1. Create a new SSH key pair without a passphrase (Example: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)\n2. Add the public key to your main repository hosting service as well as to GitLab.\n3. Add the private key as a **Secret Variable** to your project in GitLab.\n4. Add `.gitlab-ci.yml` to your project. Use the one you can find in this repository as an example.\n5. Create your project in GitLab and mirror it once manually:\n\n```bash\n# Clone your repository\ngit clone --mirror git@example.com:\u003cuser\u003e/\u003crepository\u003e\ncd \u003cpath_to_your_repo\u003e\n# Push it to your GitLab instance\ngit push --mirror git@gitlab.example.com:\u003cuser\u003e/\u003crepository\u003e\n```\n\n6. Set up a scheduled build, which runs e.g. every night.\n\nAlso have a look here https://docs.gitlab.com/ce/ci/ssh_keys/README.html for information\nabout how to use SSH keys in GitLab-CI.\n\n\n## Use an external issue tracker\nYou can also use GitHub as an external issue tracker.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobiashuste%2Fmirroring-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobiashuste%2Fmirroring-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobiashuste%2Fmirroring-example/lists"}