{"id":29857189,"url":"https://github.com/urpagin/github-mirror-user","last_synced_at":"2026-04-09T23:54:40.853Z","repository":{"id":305758346,"uuid":"1023855421","full_name":"Urpagin/github-mirror-user","owner":"Urpagin","description":"Mirrors all GitHub repositories of a user and exposes them using a performant git frontend (Forgejo).","archived":false,"fork":false,"pushed_at":"2025-07-21T22:18:16.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-21T22:24:00.646Z","etag":null,"topics":["automatic","backup","cron","crond","cronjob","data-sovereignty","docker","forgejo","git","github","local","mirror","mirroring","private","public","repos","repositories","repository","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Urpagin.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,"zenodo":null}},"created_at":"2025-07-21T19:56:27.000Z","updated_at":"2025-07-21T22:18:21.000Z","dependencies_parsed_at":"2025-07-21T22:24:02.272Z","dependency_job_id":"af261dfd-bcae-4b13-966b-e19a4f775a17","html_url":"https://github.com/Urpagin/github-mirror-user","commit_stats":null,"previous_names":["urpagin/github-mirror-user"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Urpagin/github-mirror-user","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Urpagin%2Fgithub-mirror-user","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Urpagin%2Fgithub-mirror-user/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Urpagin%2Fgithub-mirror-user/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Urpagin%2Fgithub-mirror-user/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Urpagin","download_url":"https://codeload.github.com/Urpagin/github-mirror-user/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Urpagin%2Fgithub-mirror-user/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267786016,"owners_count":24144125,"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":["automatic","backup","cron","crond","cronjob","data-sovereignty","docker","forgejo","git","github","local","mirror","mirroring","private","public","repos","repositories","repository","self-hosted"],"created_at":"2025-07-30T00:38:56.472Z","updated_at":"2026-04-09T23:54:40.814Z","avatar_url":"https://github.com/Urpagin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-mirror-user 🚀\n\nA small **Docker Compose** setup to periodically mirror all repositories, public \u0026 private, of your GitHub account and make them available with a high-performance git frontend, [Forgejo](https://forgejo.org/).\n\n\u003e [!NOTE]\n\u003e This project can **only** be installed with Docker Compose. You may use Docker alone, but you'll have to manually create the commands.\n\n## Features ✨\n\n* Periodic mirroring of **all** repositories, public and private of a GitHub account you have access.\n* Nice and lightweight git frontend.\n* Optional simple Discord webhook error logging.\n\n## Installation 🛠️\n\n\u003e [!TIP]\n\u003e Please follow the instructions carefully. They may feel out of order, but the `.env` file needs to be populated with both a GitHub token **and** a Forgejo token.\n\n1. Clone the repository 📂\n\n```bash\ngit clone https://github.com/Urpagin/github-mirror-user.git\ncd github-mirror-user\n```  \n\n2. Initialize the frontend 🌐\n\n2.1 Launch the frontend\n\n```bash\nsudo docker compose up -d server\n```\n\n2.2 Create the admin account\n\nVisit [http://127.0.0.1:64175](http://127.0.0.1:64175) (replace with your machine's IP) and follow the instructions.\n\n2.3 Create your Forgejo token\n\nGenerate your Forgejo token (see instructions in the `.env` file) and place it in the `.env` file.\n\n3. Populate fully the `.env` file 📄\n\nRead and follow the instructions contained inside the `.env` file carefully.\n\n4. Start the containers 🐳\n\n```bash\nsudo docker compose up -d\n```\n\n5. Verify \u0026 Enjoy 🎉\n\nWait for the cronjob to run (you can [modify the cron interval](https://crontab.guru/) by changing the startup command of the cron container in the `docker-compose.yml` file; make sure to force recreate the containers afterward).\n\nYou can check the logs of all the containers interactively using this command:\n```bash\ndocker compose up -d --force-recreate\n```\n\n```bash\nsudo docker compose logs -f\n```\n\n## Containers 📦\n\n### Forgejo\n\nForgejo is similar to GitLab, Gitea, or Gogs. It's written in Go and designed to be lightweight.\n\n\u003e Forgejo is a self-hosted lightweight software forge. Easy to install and low maintenance—it just does the job.\n\n* 🌍 [Website](https://forgejo.org/)\n* 📥 [Source](https://codeberg.org/forgejo/forgejo)\n\n### Alpine (cron)\n\nWe run the cron daemon in a small Alpine Linux container to periodically execute the mirroring script (`crontab_script.sh`). ⏰\n\n## Small Behaviour Explanation\n\nIf you receive a code 55 from the Discord webhook, it means the `crontab_script.sh` script is running,\nand it is run once more, almost making them overlap, if not for the lockfile logic on top of the script.\n\n## Security 🔒\n\n\u003e [!IMPORTANT]\n\u003e Ensure logs remain secure and private, as some logging includes sensitive tokens for GitHub and Forgejo!\n\nThe script doesn't account for deleted repositories, *yet*. Maybe Forgejo accounts for this, since all repos are of the\n\"mirror\" type, they might get deleted as upstream is deleted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furpagin%2Fgithub-mirror-user","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furpagin%2Fgithub-mirror-user","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furpagin%2Fgithub-mirror-user/lists"}