mirror of
https://github.com/arnaucube/mirror-to-gitea.git
synced 2026-02-07 19:46:41 +01:00
initial commit
This commit is contained in:
46
README.md
Normal file
46
README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Mirror your github repositories to your gitea server
|
||||
|
||||
This script mirrors automatically the public repositories from a github-user or github-organization to your gitea server.
|
||||
It will - once started - create a mirrored repository under a given token for a gitea user fully automatically.
|
||||
|
||||
Example:
|
||||
A github user `github-user` has public repositories `dotfiles` and `zsh-config`.
|
||||
Starting the script with a gitea token for the account `gitea-user` will create the following mirror repositories:
|
||||
|
||||
- github.com/github-user/dotfiles ← some-gitea.url/gitea-user/dotfiles
|
||||
- github.com/github-user/zsh-config ← some-gitea.url/zsh-config/dotfiles
|
||||
|
||||
The mirror settings are default by your gitea instance.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Something to mirror (a github user or organization with public repos)
|
||||
- Gitea instance up and running
|
||||
- User for Gitea with generated token
|
||||
- Docker
|
||||
|
||||
## Run it
|
||||
|
||||
```sh
|
||||
docker container run \
|
||||
-d \
|
||||
--restart always \
|
||||
-e GITHUB_USER=github-user \
|
||||
-e GITEA_URL=https://some-gitea.url \
|
||||
-e GITEA_TOKEN=please-exchange-with-token \
|
||||
jaedle/mirror-to-gitea:latest
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
- `GITHUB_USER` name of users which public repos should be mirrored
|
||||
- `GITEA_URL` url of your gitea server
|
||||
- `GITEA_TOKEN` token for your gitea user
|
||||
|
||||
## Things to do
|
||||
|
||||
- configurable interval
|
||||
- better logging
|
||||
- use github token to solve problems with rate limits
|
||||
- add gitlab support
|
||||
- and so on..
|
||||
Reference in New Issue
Block a user