Overview
Gitea Package Registry provides a unified platform for hosting multiple package types. The Packages API allows you to manage packages, versions, and files across all supported package formats.Supported Package Types
Gitea supports the following package registries:- alpine - Alpine Linux packages
- cargo - Rust crates
- chef - Chef cookbooks
- composer - PHP packages
- conan - C/C++ packages
- conda - Conda packages
- container - Docker/OCI container images
- cran - R packages
- debian - Debian packages
- generic - Generic file storage
- go - Go modules
- helm - Kubernetes Helm charts
- maven - Java Maven artifacts
- npm - Node.js packages
- nuget - .NET packages
- pub - Dart packages
- pypi - Python packages
- rpm - RPM packages
- rubygems - Ruby gems
- swift - Swift packages
- vagrant - Vagrant boxes
Packages
List Packages
List all packages for an owner (user or organization).Package owner (username or organization name)
Filter by package type (npm, maven, container, etc.)
Search query to filter packages by name
Page number for pagination (default: 1)
Number of items per page (default: 30)
Get Package
Get details about a specific package version.Package type
Package name
Package version
Package version ID
Package name
Package version
Package type
Files included in this version
Package-specific metadata (varies by type)
Delete Package
Delete a specific package version.Package Versions
List Package Versions
List all versions of a specific package.List of all versions for the package
Get Latest Version
Get the latest version of a package.Package Files
List Package Files
List all files in a package version.Repository Links
Link Package to Repository
Link a package to a repository for better organization.Name of the repository to link to
Unlink Package from Repository
Remove the link between a package and a repository.Package Type Specific Examples
Docker/Container Images
Container images use the standard Docker Registry API v2 protocol.Container images are accessed at:
gitea.example.com/owner/image:tagnpm Packages
Publish and install npm packages from Gitea.Maven Artifacts
Configure Maven to use Gitea as a repository.PyPI Packages
Publish Python packages to Gitea.NuGet Packages
Manage .NET packages with NuGet.Generic Packages
Upload arbitrary files as generic packages.Helm Charts
Manage Kubernetes Helm charts.Cargo Crates
Publish Rust crates to Gitea.Package Metadata
Each package type stores specific metadata:- npm
- Maven
- Container
- PyPI
- Package description
- Dependencies
- Keywords
- License
- Author information
Authentication
Package registry endpoints support multiple authentication methods:Token Authentication
Basic Authentication
Package Tool Authentication
Most package managers support credential storage:Storage and Cleanup
Package Retention
Administrators can configure automatic cleanup rules:- Retention days for old versions
- Maximum number of versions to keep
- Pattern-based cleanup rules
Storage Quotas
Package storage may be limited by:- Per-user quotas
- Organization quotas
- Global instance limits
Best Practices
Package Registry Configuration
Server administrators can configure package registry settings inapp.ini:
Error Handling
Common error responses:- 404 Not Found: Package or version doesn’t exist
- 409 Conflict: Package version already exists
- 413 Payload Too Large: Package exceeds size limits
- 422 Unprocessable Entity: Invalid package format or metadata
- 403 Forbidden: Insufficient permissions
Rate Limiting
Package registry endpoints may be subject to rate limiting to prevent abuse. Check response headers:X-RateLimit-Limit: Maximum requests per time windowX-RateLimit-Remaining: Remaining requestsX-RateLimit-Reset: Time when limit resets