|
1 year ago | |
---|---|---|
cmd | 2 years ago | |
config | 2 years ago | |
migrations | 2 years ago | |
web | 2 years ago | |
.changelog.yml | 2 years ago | |
.gitignore | 2 years ago | |
Dockerfile | 2 years ago | |
Dockerfile.web | 2 years ago | |
Gopkg.lock | 2 years ago | |
Gopkg.toml | 2 years ago | |
LICENSE | 2 years ago | |
Makefile | 2 years ago | |
README.md | 1 year ago | |
commands.go | 2 years ago | |
commands_web.go | 2 years ago | |
config.example.yml | 2 years ago | |
drone.yml | 2 years ago | |
main.go | 2 years ago |
A tool to migrate GitHub Repositories to Gitea including all issues, labels, milestones and comments.
This repository got moved to the offical Gitea server and will be developed there. https://gitea.com/gitea/migrator/
There will be some big changes on how the migrator works in order to improve the performance and the result of a migration.
Migrates:
go get git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
cd $GOPATH/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
dep ensure
make build
Run make web-build
instead of make build
to include web support.
We provide binaries of master builds and all releases at our minio storage server.
Additionally we provide them for every release as release attachment under releases.
You don't need any dependencies except the binary to run the migrator.
These binaries include web support by default.
We provide a cli docker image:
For master builds:
docker run ggmigrator/cli:latest
For release builds:
docker run ggmigrator/cli:0.0.10
Migrate one repository:
gitea-github-migrator migrate \
--gh-repo owner/reponame \
--gh-token GITHUB_TOKEN \
--url http://gitea-url.tdl \
--token GITEA_TOKEN \
--owner 1
gh-token
is only required if you have more than 50 issues / repositories.
Migrate all repositories:
gitea-github-migrator migrate-all \
--gh-user username \
--gh-token GITHUB_TOKEN \
--url http://gitea-url.tdl \
--token GITEA_TOKEN \
--owner 1
Migrate all repositories without issues etc. (classic):
gitea-github-migrator migrate-all \
--gh-user username \
--gh-token GITHUB_TOKEN \
--url http://gitea-url.tdl \
--token GITEA_TOKEN \
--owner 1
--only-repo
Since 0.1.0 gitea-github-migrator comes with an integrated web interface. Follow these steps to get the web interface running:
config.yml
file and change the properties according to your wishes. Please keep in mind that
you have to create a GitHub OAuth application to make the web interface work../gitea-github-migrator web
http://localhost:4000
We're providing a docker image with web support. To start the web service please run:
docker run ggmigrator/web -p 4000:4000 -v data/:/data
Place your config.yml
into data/config.yml
.
Example:
# GitHub contains the OAuth2 application data obtainable from GitHub
GitHub:
client_id: GITHUB_OAUTH_CLIENT_ID
client_secret: GITHUB_OAUTH_SECRET
# Web contains the configuration for the integrated web server
Web:
port: 4000
host: 0.0.0.0