arnaucube
arnaucube/mirror-to-giteaPublic Self-hosted repository
mirror-to-gitea/README.md
README.mdRaw
 1# Mirror your github repositories to your gitea server
 2
 3# Badges
 4[![](https://images.microbadger.com/badges/image/jaedle/mirror-to-gitea.svg)](https://microbadger.com/images/jaedle/mirror-to-gitea "Get your own image badge on microbadger.com")
 5
 6
 7# Description
 8
 9This script mirrors automatically the public repositories from a github-user or github-organization to your gitea server. 
10It will - once started - create a mirrored repository under a given token for a gitea user fully automatically.
11
12Example:
13A github user `github-user` has public repositories `dotfiles` and `zsh-config`.
14Starting the script with a gitea token for the account `gitea-user` will create the following mirror repositories:
15
16- github.com/github-user/dotfiles ← some-gitea.url/gitea-user/dotfiles
17- github.com/github-user/zsh-config ← some-gitea.url/zsh-config/dotfiles
18
19The mirror settings are default by your gitea instance.
20
21## Prerequisites
22
23- Something to mirror (a github user or organization with public repos)
24- Gitea instance up and running
25- User for Gitea with generated token
26- Docker
27
28## Run it
29
30```sh
31docker container run \
32 -d \
33 --restart always \
34 -e GITHUB_USERNAME=github-user \
35 -e GITEA_URL=https://some-gitea.url \
36 -e GITEA_TOKEN=please-exchange-with-token \
37 jaedle/mirror-to-gitea:latest
38```
39
40### Parameters
41
42- `GITHUB_USERNAME` name of user or organization which public repos should be mirrored
43- `GITEA_URL` url of your gitea server
44- `GITEA_TOKEN` token for your gitea user
45
46## Things to do
47
48- configurable interval
49- better logging
50- use github token to solve problems with rate limits
51- add gitlab support
52- and so on..