52 lines
1.0 KiB
Markdown
52 lines
1.0 KiB
Markdown
Migrate to gitea
|
|
|
|
Usage:
|
|
|
|
With key over ssh
|
|
```
|
|
./migrate.sh \
|
|
--admin gitea_user \
|
|
--url http://gitea.example.com \
|
|
--token TOKEN_VALUE \
|
|
--pushurl ssh://git@gitea.example.com:3022 \
|
|
"ARG 1" ... "ARG N"
|
|
```
|
|
With password over http
|
|
```
|
|
./migrate.sh \
|
|
--admin gitea_user \
|
|
--url http://gitea.example.com \
|
|
--token TOKEN_VALUE \
|
|
--password PASSWORD_VALUE \
|
|
"ARG 1" ... "ARG N"
|
|
```
|
|
ARG format: ``"/path/to/repo:ORG_NAME:REPO_NAME"``
|
|
|
|
examples:
|
|
```
|
|
# only path to repo - owner will be $GITEA_ADMIN_USERNAME
|
|
# name will be result of $(basename "/path/to/repo" ".git")
|
|
/path/to/repo
|
|
|
|
# org only
|
|
/path/to/repo:ORG_NAME
|
|
|
|
# org and name
|
|
/path/to/repo:ORG_NAME:REPO_NAME
|
|
|
|
# name only - owner will be $GITEA_ADMIN_USERNAME
|
|
/path/to/repo::REPO_NAME
|
|
```
|
|
configuration can be done with file ``./init.sh``
|
|
```
|
|
GITEA_ADMIN_USERNAME="$USER"
|
|
GITEA_SERVER_PUSH_URL="ssh://git@gitea.example.com:3022"
|
|
GITEA_ADMIN_TOKEN="TOKEN_VALUE"
|
|
GITEA_SERVER_URL="http://gitea.example.com"
|
|
```
|
|
|
|
Required commands:
|
|
```
|
|
git
|
|
curl
|
|
``` |