{"id":28970072,"url":"https://github.com/dostuffthatmatters/github-export-tool","last_synced_at":"2026-04-16T14:06:11.788Z","repository":{"id":65925686,"uuid":"543839910","full_name":"dostuffthatmatters/github-export-tool","owner":"dostuffthatmatters","description":"downloads everything from a list of GitHub organizations and users","archived":false,"fork":false,"pushed_at":"2025-06-18T19:25:39.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T20:28:11.673Z","etag":null,"topics":["backup","download","export","git","github","github-cli","periodic"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dostuffthatmatters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-10-01T00:38:30.000Z","updated_at":"2025-06-18T19:25:43.000Z","dependencies_parsed_at":"2023-11-18T17:59:48.051Z","dependency_job_id":null,"html_url":"https://github.com/dostuffthatmatters/github-export-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dostuffthatmatters/github-export-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dostuffthatmatters%2Fgithub-export-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dostuffthatmatters%2Fgithub-export-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dostuffthatmatters%2Fgithub-export-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dostuffthatmatters%2Fgithub-export-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dostuffthatmatters","download_url":"https://codeload.github.com/dostuffthatmatters/github-export-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dostuffthatmatters%2Fgithub-export-tool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261649897,"owners_count":23189768,"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":["backup","download","export","git","github","github-cli","periodic"],"created_at":"2025-06-24T10:15:10.405Z","updated_at":"2026-04-16T14:06:11.747Z","avatar_url":"https://github.com/dostuffthatmatters.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💾 \u0026nbsp;Github Export Tool\n\nA tool that downloads everything from a list of GitHub organizations and users.\n\n- [x] ⚙️ \u0026nbsp;Code (with all branches and tags)\n- [ ] 🪲 \u0026nbsp;Issues\n- [ ] ⚔️ \u0026nbsp;Pull Requests\n- [ ] 📍 \u0026nbsp;Releases\n- [ ] 🚛 \u0026nbsp;LFS items\n\nThis can be used to periodically back up your whole organization. Existing tools that do this backup are crazy expensive (like https://rewind.com/pricing-backups/). And export via migration is only available for GitHub Enterprise.\n\nUnder the hood, this tool uses the [GitHub CLI](https://cli.github.com/). Currently only works when using authentication via SSH.\n\n**🙌 Contributions are welcome.**\n\n\u003cbr/\u003e\n\n## ⚔️ How to Use it?\n\n1. Install Poetry (https://python-poetry.org/)\n2. Install Python3.10 (https://python.org/)\n3. Install the GitHub CLI (https://cli.github.com/)\n4. Authenticate your GitHub CLI\n\n```bash\ngh auth\n```\n\n5. Create venv and install dependencies:\n\n```bash\npython3.10 -m venv .venv\nsource .venv/bin/activate\npoetry install\n```\n\n6. Use the `config.template.json` to create a `config.json`\n7. Run\n\n```bash\npython run.py\n```\n\n\u003cbr/\u003e\n\n## 🥷 Some Details\n\n- For each organization/username, it calls `gh repo list \u003corg-or-user\u003e --json name --limit 1000` to get the respective repository names.\n- It clones the repo with all branches using `git clone git@github.com:\u003corg-or-user\u003e/\u003crepo\u003e.git --mirror`.\n- It only downloads the repositories that have been updated since the last run. Using the `gh repo view \u003corg-or-user\u003e/\u003crepo\u003e --json pushedAt` command for every repo, it fetches the last commit time on any branch and saves it to `out/github-meta.json`.\n- You can configure the command used to call the GitHub CLI. Since the abbreviation `gh` is very short you could just set the actual path - e.g. `config.github_cli = \"/opt/homebrew/bin/gh\"`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdostuffthatmatters%2Fgithub-export-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdostuffthatmatters%2Fgithub-export-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdostuffthatmatters%2Fgithub-export-tool/lists"}