Overview
Gitea includes a comprehensive package registry that supports multiple package formats, enabling you to host and distribute your software packages alongside your source code. This integrated approach simplifies dependency management and distribution workflows.Supported Package Types
Gitea supports a wide variety of package formats:Container
Docker and OCI-compatible container images
npm
Node.js packages for JavaScript/TypeScript
Maven
Java packages and dependencies
PyPI
Python packages (pip)
NuGet
.NET packages
Go
Go modules
Cargo
Rust crates
Composer
PHP packages
RubyGems
Ruby gems
Helm
Kubernetes charts
Debian
.deb packages
RPM
.rpm packages
Package Type Implementation
Enabling Packages
Docker / Container Registry
Configuring Docker Client
- Docker Login
- Push Image
- Pull Image
Multi-Architecture Images
npm Packages
Publishing npm Packages
Installing npm Packages
Maven Packages
Publishing Maven Packages
Configurepom.xml:
~/.m2/settings.xml:
Using Maven Packages
Python / PyPI Packages
Publishing Python Packages
Installing Python Packages
NuGet Packages
Publishing NuGet Packages
Installing NuGet Packages
Go Modules
Using Go Packages
Gitea automatically serves Go modules from repository:Package Management
Package Creation Flow
Viewing Packages
- Repository Packages
- User/Org Packages
- Navigate to Packages tab in repository
- View all packages in the repository
- See package versions
- Download package files
Package Versions
Version Management
Semantic Versioning
- Follow semver (v1.2.3)
- Major.Minor.Patch
- Pre-release tags (v1.0.0-beta.1)
- Build metadata (v1.0.0+build.123)
Version Operations
- View all versions
- Download specific versions
- Delete old versions
- View version metadata
Version Listing
Authentication
Token-Based Authentication
Create access tokens for package operations:Select Scopes
Choose appropriate scopes:
read:package- Read packageswrite:package- Publish packagesdelete:package- Delete packages
Package Cleanup
Cleanup Rules
Automate package cleanup to manage storage:Cleanup Configuration
Cleanup Configuration
Retention PoliciesManual Cleanup
- Keep N most recent versions
- Delete versions older than X days
- Keep versions matching pattern
- Delete untagged container images
- Delete individual versions
- Delete entire packages
- Bulk deletion operations
- Cleanup orphaned files
Storage Quotas
Control package storage usage:User Quotas
- Total storage limit per user
- Per-package-type limits
- Soft and hard limits
- Quota warnings
Organization Quotas
- Organization-wide limits
- Shared among members
- Per-package-type limits
- Usage monitoring
Package Visibility
- Public Packages
- Private Packages
- Internal Packages
- Accessible without authentication
- Listed in public package index
- Can be used by anyone
- Promotes open source sharing
Package API
REST API Endpoints
Integration with Actions
Publish packages automatically with Gitea Actions:Best Practices
Package Management Guidelines
Package Management Guidelines
Versioning
- Follow semantic versioning
- Tag releases in Git
- Document breaking changes
- Use pre-release versions for testing
- Use access tokens, not passwords
- Rotate tokens regularly
- Set appropriate visibility
- Scan for vulnerabilities
- Sign packages when possible
- Use consistent naming conventions
- Add package descriptions
- Include README files
- Link to source repository
- Document dependencies
- Configure cleanup rules
- Monitor storage usage
- Delete unused packages
- Archive old versions
- Use external storage for large packages
Troubleshooting
Authentication Issues
- Verify token has correct scopes
- Check token expiration
- Confirm username/token format
- Review registry URL
Publishing Failures
- Check package format
- Verify version doesn’t exist
- Confirm storage quota
- Review package size limits
See Also
- Actions - Automate package publishing
- Repositories - Source code management
- API Documentation - Package registry API