Dennis Jekubczyk 05e0e470e0 | 3 years ago | |
---|---|---|
.github/workflows | 3 years ago | |
build | 3 years ago | |
cmd | 3 years ago | |
third_party/golangci-lint | 3 years ago | |
.gitignore | 5 years ago | |
.tool-versions | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
Taskfile.yml | 3 years ago | |
go.mod | 3 years ago | |
run-local.sh | 5 years ago |
mirror-to-gitea
automatically creates repository mirrors from a Github User to your gitea server. The hard work (
continous mirroring) is done by Gitea on a continuous basis.
There a different usage modes:
A github user github-user
has the public repositories dotfiles
and zsh-config
. Starting the script with a gitea
token for the account gitea-user
will create the following mirror repositories:
The mirror settings are default by your gitea instance.
You obtained a github token for github-user
which has a public repository public-example
a private
repository private-example
. Running the mirroring process for gitea-user
will create the following mirror
repositories:
The mirror settings are default by your gitea instance.
GITHUB_USERNAME
name of user with public repos should be mirroredGITEA_URL
url of your gitea serverGITEA_TOKEN
token for your gitea userMIRROR_REPOSITORIES
PUBLIC
(optional, is default)GITHUB_TOKEN
Github personal access token (optional to avoid rate limits)docker container run \
-d \
--restart always \
-e MIRROR_REPOSITORIES='PUBLIC' \
-e GITHUB_USERNAME='github-user' \
-e GITHUB_TOKEN='<optional-github-token>' \
-e GITEA_URL=https://some-gitea.url \
-e GITEA_TOKEN='<gitea-token>' \
jaedle/mirror-to-gitea:latest
This will a spin up a docker container running infinite which will try to mirror all your repositories once every hour to your gitea server.
MIRROR_MODE
'PRIVATE_AND_PUBLIC'GITHUB_TOKEN
Github personal access tokenGITEA_URL
url of your gitea serverGITEA_TOKEN
token for your gitea userdocker container run \
-d \
--restart always \
-e MIRROR_MODE='PRIVATE_AND_PUBLIC' \
-e GITHUB_TOKEN='<github-token>' \
-e GITEA_URL=https://some-gitea.url \
-e GITEA_TOKEN=please-exchange-with-token \
jaedle/mirror-to-gitea:latest