#+TITLE: git-migratea
Import git repositories to an instance of gitea. Importing means:
- creating a repository in gitea using the API
- using the SSH URL for cloning
- setting the remote to be origin on the repos, with the new value
- pushing with =git push -u origin --all=
** Usage
#+begin_src sh
GIT_REPOS=~/workspace/tmp/repositories GITEA_URL=https://git.fcuny.net GITEA_API_KEY=<API_KEY> ./git-migratea
#+end_src
You need to generate an API key for the migration (for example from [[https://git.fcuny.net/user/settings/applications][settings/applications]]) and set the environment variable =GITEA_API_KEY= to its value. You'll also need to point to the list of repositories (on disk) to migrate.