Skip to content

devpi-gitea-sync

Synchronize Python packages from the Gitea package registry into one or more Devpi indices.

The tool queries the Gitea PyPI package registry, downloads wheel and source distribution files, and uploads them to the configured Devpi index — either on demand or continuously in server mode with a live web dashboard.


Quick start

1. Install

pip install devpi-gitea-sync

2. Create a config file named devpi-gitea-sync.conf in your working directory:

[gitea]
url = https://gitea.example.com
token_env = GITEA_TOKEN

[devpi]
url = https://devpi.example.com
username = devpi-user
password_env = DEVPI_PASSWORD

[mapping:my-org]
organization = my-org
index = user/dev

3. Lock down permissions (required on Linux/macOS):

chmod 600 devpi-gitea-sync.conf

4. Run

# Continuous server with live dashboard at http://localhost:8080/
devpi-gitea-sync --server -v

# One-off dry run (discover without uploading)
devpi-gitea-sync --dry-run -v

Features

  • Polls the Gitea PyPI package registry — works with packages published via twine or CI/CD
  • Uploads .whl, .tar.gz, and .zip distributions to any Devpi index
  • Server mode with a live HTML dashboard (/) and JSON health endpoint (/health)
  • Per-organization Gitea tokens, multiple Devpi servers, repository allowlists
  • Dry-run mode, force re-upload, and package/org/mapping filters
  • File permissions enforced — refuses to run if config is group/world-readable