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