You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

5 years ago
5 years ago
5 years ago
  1. # Mirror your github repositories to your gitea server
  2. This script mirrors automatically the public repositories from a github-user or github-organization to your gitea server.
  3. It will - once started - create a mirrored repository under a given token for a gitea user fully automatically.
  4. Example:
  5. A github user `github-user` has public repositories `dotfiles` and `zsh-config`.
  6. Starting the script with a gitea token for the account `gitea-user` will create the following mirror repositories:
  7. - github.com/github-user/dotfiles ← some-gitea.url/gitea-user/dotfiles
  8. - github.com/github-user/zsh-config ← some-gitea.url/zsh-config/dotfiles
  9. The mirror settings are default by your gitea instance.
  10. ## Prerequisites
  11. - Something to mirror (a github user or organization with public repos)
  12. - Gitea instance up and running
  13. - User for Gitea with generated token
  14. - Docker
  15. ## Run it
  16. ```sh
  17. docker container run \
  18. -d \
  19. --restart always \
  20. -e GITHUB_USERNAME=github-user \
  21. -e GITEA_URL=https://some-gitea.url \
  22. -e GITEA_TOKEN=please-exchange-with-token \
  23. jaedle/mirror-to-gitea:latest
  24. ```
  25. ### Parameters
  26. - `GITHUB_USERNAME` name of user or organization which public repos should be mirrored
  27. - `GITEA_URL` url of your gitea server
  28. - `GITEA_TOKEN` token for your gitea user
  29. ## Things to do
  30. - configurable interval
  31. - better logging
  32. - use github token to solve problems with rate limits
  33. - add gitlab support
  34. - and so on..