Skip to main content

PyPI versio PyPi format PyPI license PyPi weekly downloads

github2gitea

Migrates GitHub repositories to Gitea.

github2gitea is a command-line application for importing and mirroring GitHub repositories to Gitea. It can be used as well for continously adding newly created repositories in regular intervals, e.g. using cron.

Usage

All usage parameter can be set as command-line arguments:

usage: github2gitea [-h] [-c CONFIG_FILE] [-d] [-n] [-p] [-q] [-s]
                    [--github-token GITHUB_TOKEN] [--github-user GITHUB_USER]
                    [--gitea-apiurl GITEA_APIURL] [--gitea-token GITEA_TOKEN] [--exclude]
                    [--migrate-forks] [--owner-filter OWNER_FILTER] [--migrate-issues]
                    [--migrate-labels] [--migrate-milestones] [--migrate-pull-requests]
                    [--migrate-releases] [--migrate-wikis] [--mirror]
                    [--mirror-interval MIRROR_INTERVAL] [--owner OWNER] [--recreate]
                    [--use-full-name]
                    [repos ...]

Migrate GitHub repositories to Gitea.

positional arguments:
  repos                 (optional) explicit list of GitHub repositories formatted as
                        owner/name. By default, only the listed repositories are processed.
                        If the --exclude option is given, the listed strings are used as
                        search patterns for removing repositories.

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
  -s, --syslog          enable logging to syslog
  --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
  --exclude             exclude repositories instead of exclusively selecting them
  --migrate-forks       migrate forks
  --owner-filter OWNER_FILTER
                        set GitHub repository owner filter
  --migrate-issues      migrate issues
  --migrate-labels      migrate labels
  --migrate-milestones  migrate milestones
  --migrate-pull-requests
                        migrate pull requests (not yet fully implemented in Gitea)
  --migrate-releases    migrate releases (not yet fully implemented in Gitea)
  --migrate-wikis       migrate wikis
  --mirror              set up mirroring of repo
  --mirror-interval MIRROR_INTERVAL
                        mirror interval (default: 8 hours). Valid time units are "h", "m,
                        "s". 0 to disable automatic sync
  --owner OWNER         set Gitea user or org owning the repos (default: owner of used access
                        token)
  --recreate            recreate repos if they already exist
  --use-full-name       use full repo name including owner for migration (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"
}

Metadata

Release files for github2gitea 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for github2gitea 0.6.1
File Size Uploaded Provenance Actions
github2gitea-0.6.1.tar.gz 19.0 kB Without provenance Details for github2gitea-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for github2gitea 0.6.1
File Interpreter ABI Platform Actions
github2gitea-0.6.1-py3-none-any.whl Python 3 none any Details for github2gitea-0.6.1-py3-none-any.whl

Total release size: 37.6 kB

Release files / github2gitea-0.6.1.tar.gz

Download URL github2gitea-0.6.1.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b33aff76d638ccbea73bd8ba82a8264c566d1e28d465f03dce77ba0413eb1c36
BLAKE2b-256 checksum
How to use checksums
fa00202967f6bcb51d1769688c7d5f186f0038479edc4c5fa6912ad97b66e7cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / github2gitea-0.6.1-py3-none-any.whl

Download URL github2gitea-0.6.1-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
935d27d92f8a7e3de43ec147122161ad647a756be1df3e655be52ff48951d60a
BLAKE2b-256 checksum
How to use checksums
0ccfc334bad4016cb5b6e56633861bf5ac04cf3e76a4f8edaa0675c60d88bf17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for github2gitea 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page