{"id":15902899,"url":"https://github.com/erikh/gitea-import","last_synced_at":"2025-04-02T20:14:15.375Z","repository":{"id":57643364,"uuid":"318162095","full_name":"erikh/gitea-import","owner":"erikh","description":"Gitea repository import tool","archived":false,"fork":false,"pushed_at":"2020-12-03T10:53:51.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-08T10:42:42.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/erikh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-03T10:51:58.000Z","updated_at":"2022-06-06T11:28:57.000Z","dependencies_parsed_at":"2022-08-27T21:53:17.573Z","dependency_job_id":null,"html_url":"https://github.com/erikh/gitea-import","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/erikh%2Fgitea-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fgitea-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fgitea-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fgitea-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikh","download_url":"https://codeload.github.com/erikh/gitea-import/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246884767,"owners_count":20849554,"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":[],"created_at":"2024-10-06T12:00:32.964Z","updated_at":"2025-04-02T20:14:15.346Z","avatar_url":"https://github.com/erikh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitea-import: import repositories into Gitea in an automated fashion\n\nI wrote this in a hurry as my existing Gitea died hard; and I needed to\nreimport without a database attached; that is, I had all my repositories, just\nnot the surrounding database data.\n\nThis tool was born in a few hours and reads like it. Really, what you should do\nwith it, if anything, is read and modify it to suit your needs.\n\nThe tool requires a manifest to import the directories (called a \"change list\"\nhere in the docs) and you'll have to generate this yourself. There are some\ntips at the end of this README that help with generation.\n\nThis tool will:\n\n- Span repositories and organizations\n- Create as necessary, and ignore on multiple runs\n- Handles private repositories (see the change list)\n- Detects default branch (current `HEAD` of git repo) properly pushes the\n  content through git and not by any other means.\n\n## Installing\n\n```bash\ngo get github.com/erikh/gitea-import\n```\n\n## Running\n\nFirst, create a Gitea token through the API for your **new** gitea instance. Then, run\nthis in the `/data/git/repositories` directory in your **old/existing** gitea instance:\n\n```bash\ngitea-import \u003curl\u003e \u003capi token\u003e \u003cchange list filename\u003e\n```\n\n## Example Change List\n\nIt contains the repository name, qualified by org/username and the privacy\nsetting (true is private). These are transposed into directory names in the\nGitea `repositories` data directory.\n\n```\nerikh/ldhcpd false\nerikh/secret true\nerikh/duct false\n```\n\n## Generating the repository list\n\nYou can do this easily with the following command, but you must go in and\nedit+annotate each line with a `true` or `false` to indicate private repositories.\n\n```bash\nfind . -mindepth 2 -maxdepth 2 -type d | sed -e 's!^./!!' | sed -e 's!.git$!!' \u003echangelist\n```\n\n## Author\n\nErik Hollensbe \u003cgithub@hollensbe.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikh%2Fgitea-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikh%2Fgitea-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikh%2Fgitea-import/lists"}