{"id":17654132,"url":"https://github.com/andrewslotin/doppelganger","last_synced_at":"2025-07-27T02:09:09.822Z","repository":{"id":46560145,"uuid":"47841595","full_name":"andrewslotin/doppelganger","owner":"andrewslotin","description":"A tool to mirror GitHub repositories.","archived":false,"fork":false,"pushed_at":"2024-04-19T11:39:17.000Z","size":3035,"stargazers_count":14,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-20T06:22:29.902Z","etag":null,"topics":["backup","git","github-mirror","hacktoberfest","mirror"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewslotin.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":"2015-12-11T17:41:14.000Z","updated_at":"2022-08-07T17:09:23.000Z","dependencies_parsed_at":"2023-12-19T17:47:14.473Z","dependency_job_id":"85875b3e-f63b-432e-955b-11e039829c1b","html_url":"https://github.com/andrewslotin/doppelganger","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/andrewslotin/doppelganger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fdoppelganger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fdoppelganger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fdoppelganger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fdoppelganger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewslotin","download_url":"https://codeload.github.com/andrewslotin/doppelganger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewslotin%2Fdoppelganger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267285689,"owners_count":24064209,"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-27T02:00:11.917Z","response_time":82,"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":["backup","git","github-mirror","hacktoberfest","mirror"],"created_at":"2024-10-23T12:08:46.559Z","updated_at":"2025-07-27T02:09:09.796Z","avatar_url":"https://github.com/andrewslotin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![Doppelganger](../master/media/logo.png?raw=true)\n\nA tool to create and maintain mirrors of GitHub repositories. Once the repostiory is mirrored a \nwebhook is set up, so next time you push to GitHub `master` mirror will be updated. You may also trigger an update \nmanually by clicking \"Synchronize repository\".\n\n[![Build Status](https://travis-ci.org/andrewslotin/doppelganger.svg?branch=master)](https://travis-ci.org/andrewslotin/doppelganger)\n[![Linters Check](https://goreportcard.com/badge/github.com/andrewslotin/doppelganger)](https://goreportcard.com/report/github.com/andrewslotin/doppelganger)\n\nWhy Would I Need It?\n--------------------\n\nWell, if you ask this question then most likely you won't. But next time some Chinese website \n[decides to host their assets on GitHub](http://arstechnica.com/security/2015/03/massive-denial-of-service-attack-on-github-tied-to-chinese-government/) you know you've been warned.\n\nInstallation\n------------\n\nCreate new [personal access token](http://github.com/settings/tokens) with following permissions:\n\n* `public_repo`\n* `write:repo_hook`\n\nMake sure you have `git` installed.\n\nDownload the [latest release](https://github.com/andrewslotin/doppelganger/releases), extract it and then run:\n\n```bash\nDOPPELGANGER_GITHUB_TOKEN=\u003cYOUR_PERSONAL_ACCESS_TOKEN\u003e ./doppelganger \n```\n\nThis will run a server listening on `0.0.0.0:8081` and all mirrored repositories will go to `./mirror`. \n\nRun `./doppelganger --help` to learn how to override these defaults.\n\n### Build From Source\n\n```bash\n# Download and compile\ngo get github.com/andrewslotin/doppelganger\n# Current working dir should have templates/ and assets/ folders\ncd $GOPATH/src/github.com/andrewslotin/doppelganger\n# Run it\nDOPPELGANGER_GITHUB_TOKEN=\u003cYOUR_PERSONAL_ACCESS_TOKEN\u003e $GOPATH/bin/doppelganger\n```\n\n### Docker\n\n```bash\ndocker pull andrewslotin/doppelganger\ndocker run -d --name doppelganger -e DOPPELGANGER_GITHUB_TOKEN=\u003cYOUR_PERSONAL_ACCESS_TOKEN\u003e -v /home/git:/var/mirrors -p 8081:8081 andrewslotin/doppelganger\n```\n\nSee [Docker Hub Page](https://hub.docker.com/r/andrewslotin/doppelganger/) for details.\n\nUsage\n-----\n\nMirrors can be used just like any other git remote. You can even push your changes there directly, but note that they will be discarded next time someone pushes \nto GitHub `master`.\n\nFollowing exaples assume you have `git` user set up on your mirror server with `HOME` set to Doppelganger mirror directory.\n\nSet up a new local copy of `github.com/example/project` from mirror:\n\n```bash\ngit clone git@\u003cdoppelganger-host\u003e:example/project\n```\n\nUse mirror as a second remote in already existing repository:\n\n```bash\ngit add remote mirror git@\u003cdoppelganger-host\u003e:example/project\n\n# Make your local master using mirror as an upstream:\ngit branch --unset-upstream master\ngit branch --set-upstream master mirror/master\ngit reset master mirror/master\n\n# Switch back to GitHub\ngit branch --unset-upstream master\ngit branch --set-upstream master origin/master\n```\n\nMirroring Private Repositories\n------------------------------\n\nTo mirror private repositories your personal access token should have `repo` permission.\n\nDoppelganger uses `git+ssh` protocol to clone private repositories, which requires an SSH key to be present in the system.\nWhile attempting to clone a private repository Doppelganger will try to use an existing key stored in `~/.ssh`. If there\nis no key it will attempt generate a new 2048-bit RSA key pair and offer to add the public key to the list of [your GitHub SSH keys](https://github.com/settings/keys).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewslotin%2Fdoppelganger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewslotin%2Fdoppelganger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewslotin%2Fdoppelganger/lists"}