Synchronize GitHub repositories to Gitea.
Project description
github2gitea - Set up Gitea mirrors of GitHub repositories.
Usage
All usage parameter can be set as command-line arguments:
usage: github2gitea [-h] [-c CONFIG_FILE] [-d] [-n] [-p] [-q] [--github-token GITHUB_TOKEN]
[--github-user GITHUB_USER] [--gitea-apiurl GITEA_APIURL]
[--gitea-token GITEA_TOKEN] [--mirror-forks]
[--owner-filter OWNER_FILTER] [--mirror-interval MIRROR_INTERVAL]
[--mirror-issues] [--mirror-labels] [--mirror-milestones]
[--mirror-owner MIRROR_OWNER] [--mirror-pull-requests]
[--mirror-releases] [--mirror-wikis] [--recreate] [--use-full-name]
[repos ...]
Set up Gitea mirrors of GitHub repositories.
positional arguments:
repos (optional) explicit list of GitHub repositories formatted as
owner/name
optional arguments:
-h, --help show this help message and exit
-c CONFIG_FILE, --config-file CONFIG_FILE
path to config file
-d, --debug enable debug output
-n, --dry-run execute read-only actions
-p, --print-config print configuration and exit
-q, --quiet enable quiet mode
--github-token GITHUB_TOKEN
set GitHub access token
--github-user GITHUB_USER
set GitHub user
--gitea-apiurl GITEA_APIURL
set Gitea API URL
--gitea-token GITEA_TOKEN
set Gitea access token
--mirror-forks mirror forks
--owner-filter OWNER_FILTER
set GitHub repository owner filter
--mirror-interval MIRROR_INTERVAL
mirror interval (default: 8 hours). Valid time units are "h", "m,
"s". 0 to disable automatic sync.
--mirror-issues mirror issues (not yet fully implemented in Gitea)
--mirror-labels mirror labels (not yet fully implemented in Gitea)
--mirror-milestones mirror milestones (not yet fully implemented in Gitea)
--mirror-owner MIRROR_OWNER
set Gitea user or org owning the mirror repos (default: owner of used
access token)
--mirror-pull-requests
mirror pull requests (not yet fully implemented in Gitea)
--mirror-releases mirror releases (not yet fully implemented in Gitea)
--mirror-wikis mirror wikis
--recreate recreate mirrored repos if they already exist
--use-full-name use full repo name including owner for mirror (i.e. "owner_name")
Alternatively, configuration parameters can be set in a json-formatted file.
Default search paths are
* `$HOME/.config/github2gitea/config.json`
* `$PWD/config.json`
An additional file path can be added using the -c/--config-file
option.
Minimal settings required for running
First, create a Personal Access Token on GitHub with at least scope 'repo'. Consider setting an unlimited lifetime.
Create a Gitea access token for your user.
Set the following in a configuration file (or the corresponding command-line options):
{
"github_user" : "GITHUB_USERNAME",
"github_token" : "GITHUB_PERSONAL_ACCESS_TOKEN",
"gitea_apiurl" : "GITEA_APIURL",
"gitea_token" : "GITEA_ACCESS_TOKEN
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
github2gitea-0.2.tar.gz
(18.2 kB
view details)
Built Distribution
File details
Details for the file github2gitea-0.2.tar.gz
.
File metadata
- Download URL: github2gitea-0.2.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1aea40b11bcec7b1a39e006ef8aec248f534db2a4590cb1eb5c3265e8d5756e8 |
|
MD5 | 1b20ce66326cdfa3c62257be9886fe85 |
|
BLAKE2b-256 | dfce3f378bdc75bd078d840491a77fccadbedc3746ce1eae7e2066d89a950bb4 |
File details
Details for the file github2gitea-0.2-py3-none-any.whl
.
File metadata
- Download URL: github2gitea-0.2-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea41844a067accca752a488ae35a66020c75b1936878d0bbf72c2b797bfd274e |
|
MD5 | 8f25c0f689d49d0bb473c1afc00dc540 |
|
BLAKE2b-256 | f69043aae6b267292fe26d74e632bb56cc71059f730a8bdeba6f58fdc45d5acd |