Crates.io | gitea-migrate |
lib.rs | gitea-migrate |
version | 0.1.0 |
source | src |
created_at | 2022-04-25 13:36:09.081847 |
updated_at | 2022-04-25 13:36:09.081847 |
description | A basic script that automatically migrates multiple github repositories to a gitea instance |
homepage | https://basingse.org |
repository | https://github.com/maxgallup/gitea-migrate |
max_upload_size | |
id | 573865 |
size | 56,943 |
Migrate or mirror multiple repositories from Github to a Gitea instance. It can be used manually as a cli tool, or automated on a server with something like cron jobs.
Specify exactly which repositories should be mirrored or migrated with the following flags:
--public
- (default) only mirror all public repositories under your username--private
- only mirror all private repositories under your username--both
- only mirror all private and public repositories under your username--all
- mirror all private and public repositories including ones from other users that you are associated with--no-mirror
- will only clone the repositories (not as mirrors)You must specify a destination URL to the target Gitea instance as a cli argument.
Since migrating repositories requires user authorization, you will be prompted to enter your github
username and access token. Additionally, you will be required
enter the username and password for your target Gitea instance. However, if you don't wish to manually
enter credentials every time, you can simply enter your credentials in a file and specifiy with the
--creds
flag the name of the file.
credentials.txt
github_username:github_access_token
gitea_username:gitea_password
IMPORTANT Be sure to follow the above layout exactly, otherwise your credentials won't be parsed correctly. (if you feel like there is a better way to store credentials open a pull request! )
gitea-migrate --dest https://gitea.example.com --both
This will mirror all private and public repos under the github username that was manually entered.
gitea-migrate --dest https://gitea.example.com --all --no-mirror --creds ~/credentials.txt
This will migrate (and not mirror) all private and public repos associated with the user specified in the credentials.txt
file.