System Packages Guide
Artifact Keeper provides native repository support for major Linux package formats including Debian/APT, RPM/YUM/DNF, Alpine/APK, and OPKG.
Debian / APT
Artifact Keeper provides a full Debian package repository compatible with apt, apt-get, and dpkg.
Endpoint
http://localhost:8080/debian/{repo}Repository Key
debianConfiguration
Add the Artifact Keeper repository to your APT sources:
# Add repository to sources.list.decho "deb [trusted=yes] http://localhost:8080/debian/stable main" | \ sudo tee /etc/apt/sources.list.d/artifact-keeper.list
# Update package indexsudo apt updateGPG Key Import
For signed repositories, import the GPG key:
# Download and add GPG keycurl -fsSL http://localhost:8080/debian/stable/key.gpg | \ sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/artifact-keeper.gpg
# Configure with signed repositoryecho "deb [signed-by=/etc/apt/trusted.gpg.d/artifact-keeper.gpg] http://localhost:8080/debian/stable main" | \ sudo tee /etc/apt/sources.list.d/artifact-keeper.list
sudo apt updatePublishing Packages
Upload .deb packages to your repository:
# Using curlcurl -u username:password -X POST \ -F "file=@mypackage_1.0.0_amd64.deb" \ http://localhost:8080/api/artifacts/debian/stable
# Using the Artifact Keeper CLIak publish debian/stable mypackage_1.0.0_amd64.debInstalling Packages
Once configured, install packages using standard APT commands:
# Install packagesudo apt install mypackage
# Install specific versionsudo apt install mypackage=1.0.0
# Search for packagesapt search mypackage
# Show package informationapt show mypackageMultiple Distributions
Support multiple Debian distributions:
# Ubuntu focalecho "deb [trusted=yes] http://localhost:8080/debian/ubuntu-focal main" | \ sudo tee /etc/apt/sources.list.d/artifact-keeper.list
# Debian bullseyeecho "deb [trusted=yes] http://localhost:8080/debian/debian-bullseye main" | \ sudo tee /etc/apt/sources.list.d/artifact-keeper.listRPM / YUM / DNF
Artifact Keeper provides RPM repository support compatible with yum, dnf, and zypper.
Endpoint
http://localhost:8080/rpm/{repo}Repository Key
rpmConfiguration
Create a repository configuration file:
# For YUM/DNF (RHEL, CentOS, Fedora)sudo tee /etc/yum.repos.d/artifact-keeper.repo <<EOF[artifact-keeper]name=Artifact Keeper Repositorybaseurl=http://localhost:8080/rpm/stableenabled=1gpgcheck=0EOF
# For Zypper (openSUSE)sudo zypper addrepo http://localhost:8080/rpm/stable artifact-keeperGPG Key Import
For signed repositories:
# Import GPG keysudo rpm --import http://localhost:8080/rpm/stable/repodata/repomd.xml.key
# Enable GPG checkingsudo tee /etc/yum.repos.d/artifact-keeper.repo <<EOF[artifact-keeper]name=Artifact Keeper Repositorybaseurl=http://localhost:8080/rpm/stableenabled=1gpgcheck=1gpgkey=http://localhost:8080/rpm/stable/repodata/repomd.xml.keyEOFPublishing Packages
Upload .rpm packages to your repository:
# Using curlcurl -u username:password -X POST \ -F "file=@mypackage-1.0.0-1.x86_64.rpm" \ http://localhost:8080/api/artifacts/rpm/stable
# Using the Artifact Keeper CLIak publish rpm/stable mypackage-1.0.0-1.x86_64.rpmInstalling Packages
Install packages using YUM or DNF:
# YUM (RHEL 7, CentOS 7)sudo yum install mypackage
# DNF (RHEL 8+, CentOS 8+, Fedora)sudo dnf install mypackage
# Install specific versionsudo dnf install mypackage-1.0.0
# Search for packagessudo dnf search mypackage
# Show package informationsudo dnf info mypackageZypper (openSUSE)
For openSUSE systems using Zypper:
# Refresh repositoriessudo zypper refresh
# Install packagesudo zypper install mypackage
# Search for packagessudo zypper search mypackageAlpine / APK
Artifact Keeper provides Alpine package repository support for apk.
Endpoint
http://localhost:8080/alpine/{repo}Repository Key
alpineConfiguration
Add the repository to your APK configuration:
# Add repository (unsigned)echo "http://localhost:8080/alpine/v3.18/main" | \ sudo tee -a /etc/apk/repositories
# Update package indexsudo apk updateRepository Signing
For signed repositories, import the public key:
# Download public keycurl -fsSL http://localhost:8080/alpine/v3.18/key.rsa.pub \ -o /etc/apk/keys/artifact-keeper.rsa.pub
# Add signed repositoryecho "http://localhost:8080/alpine/v3.18/main" | \ sudo tee -a /etc/apk/repositories
sudo apk updatePublishing Packages
Upload .apk packages:
# Using curlcurl -u username:password -X POST \ -F "file=@mypackage-1.0.0-r0.apk" \ http://localhost:8080/api/artifacts/alpine/v3.18/main
# Using the Artifact Keeper CLIak publish alpine/v3.18/main mypackage-1.0.0-r0.apkInstalling Packages
Install packages using APK:
# Install packagesudo apk add mypackage
# Install specific versionsudo apk add mypackage=1.0.0-r0
# Search for packagesapk search mypackage
# Show package informationapk info mypackageMultiple Alpine Versions
Support multiple Alpine versions:
# Alpine 3.18echo "http://localhost:8080/alpine/v3.18/main" | \ sudo tee -a /etc/apk/repositories
# Alpine 3.19echo "http://localhost:8080/alpine/v3.19/main" | \ sudo tee -a /etc/apk/repositoriesOPKG
Artifact Keeper provides OPKG package repository support for OpenWrt and embedded Linux systems.
Endpoint
http://localhost:8080/opkg/{repo}Repository Key
opkgConfiguration
Add the repository to your OPKG configuration:
# Add to custom feedsecho "src/gz artifact_keeper http://localhost:8080/opkg/stable" | \ sudo tee -a /etc/opkg/customfeeds.conf
# Update package listsopkg updatePublishing Packages
Upload .ipk packages:
# Using curlcurl -u username:password -X POST \ -F "file=@mypackage_1.0.0_mips.ipk" \ http://localhost:8080/api/artifacts/opkg/stable
# Using the Artifact Keeper CLIak publish opkg/stable mypackage_1.0.0_mips.ipkInstalling Packages
Install packages using OPKG:
# Install packageopkg install mypackage
# Install specific versionopkg install mypackage_1.0.0
# Search for packagesopkg find mypackage
# Show package informationopkg info mypackageArchitecture-Specific Feeds
Organize packages by architecture:
# MIPS architectureecho "src/gz artifact_keeper_mips http://localhost:8080/opkg/mips" | \ sudo tee -a /etc/opkg/customfeeds.conf
# ARM architectureecho "src/gz artifact_keeper_arm http://localhost:8080/opkg/arm" | \ sudo tee -a /etc/opkg/customfeeds.conf
opkg updateRepository Signing
For production deployments, sign your repositories to ensure package integrity and authenticity.
See the Repository Signing Guide for detailed instructions on:
- Generating GPG keys for package signing
- Signing individual packages
- Signing repository metadata
- Configuring clients to verify signatures
- Key rotation and management
Integration with CI/CD
GitHub Actions Example
Build and publish packages automatically:
name: Build and Publish Packageon: [push]
jobs: build-deb: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Build Debian package run: | dpkg-buildpackage -us -uc -b mv ../mypackage_*.deb .
- name: Publish to Artifact Keeper run: | curl -u ${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }} \ -X POST \ -F "file=@mypackage_1.0.0_amd64.deb" \ https://registry.example.com/api/artifacts/debian/stable
build-rpm: runs-on: ubuntu-latest container: fedora:latest steps: - uses: actions/checkout@v4
- name: Install build tools run: dnf install -y rpm-build rpmdevtools
- name: Build RPM package run: | rpmdev-setuptree rpmbuild -ba mypackage.spec mv ~/rpmbuild/RPMS/x86_64/*.rpm .
- name: Publish to Artifact Keeper run: | curl -u ${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }} \ -X POST \ -F "file=@mypackage-1.0.0-1.x86_64.rpm" \ https://registry.example.com/api/artifacts/rpm/stableGitLab CI Example
build:deb: stage: build image: debian:bullseye script: - apt-get update && apt-get install -y build-essential devscripts - dpkg-buildpackage -us -uc -b - mv ../mypackage_*.deb . artifacts: paths: - mypackage_*.deb
publish:deb: stage: deploy script: - | curl -u $REGISTRY_USERNAME:$REGISTRY_PASSWORD \ -X POST \ -F "file=@mypackage_1.0.0_amd64.deb" \ https://registry.example.com/api/artifacts/debian/stable dependencies: - build:deb only: - mainJenkins Pipeline Example
pipeline { agent any
stages { stage('Build') { steps { sh 'dpkg-buildpackage -us -uc -b' sh 'mv ../mypackage_*.deb .' } }
stage('Publish') { steps { withCredentials([usernamePassword( credentialsId: 'artifact-keeper', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD' )]) { sh ''' curl -u $USERNAME:$PASSWORD \ -X POST \ -F "file=@mypackage_1.0.0_amd64.deb" \ https://registry.example.com/api/artifacts/debian/stable ''' } } } }}Troubleshooting
Repository Not Found
If packages are not visible after publishing:
# Verify repository metadata was generatedcurl http://localhost:8080/debian/stable/Packagescurl http://localhost:8080/rpm/stable/repodata/repomd.xmlcurl http://localhost:8080/alpine/v3.18/main/APKINDEX.tar.gz
# Force metadata regenerationcurl -u username:password -X POST \ http://localhost:8080/api/repositories/debian/stable/reindexGPG Verification Failures
If package installation fails with GPG errors:
# Debian/Ubuntu: verify key is importedapt-key listgpg --list-keys
# RHEL/CentOS: verify key is importedrpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'
# Alpine: verify key existsls -la /etc/apk/keys/Architecture Mismatch
Ensure packages match your system architecture:
# Check system architectureuname -mdpkg --print-architecture # Debian/Ubunturpm -q --qf '%{ARCH}\n' bash # RHEL/CentOS
# Verify package architecturedpkg-deb -I mypackage.deb | grep Architecturerpm -qip mypackage.rpm | grep ArchitectureConnection Issues
If unable to reach the repository:
# Test connectivitycurl -I http://localhost:8080/debian/stable/
# Check DNS resolutionnslookup registry.example.com
# Test with verbose outputapt update -o Debug::Acquire::http=trueyum install mypackage -vPermission Denied
For authentication errors:
# Verify credentialscurl -u username:password http://localhost:8080/api/user/info
# Check repository permissionscurl -u username:password http://localhost:8080/api/repositories
# Use token authenticationcurl -H "Authorization: Bearer $TOKEN" \ http://localhost:8080/api/artifacts/debian/stableBest Practices
Version Naming
Follow distribution conventions:
# Debian: package_version_architecture.debmypackage_1.0.0_amd64.debmypackage_1.0.0-1_arm64.deb
# RPM: package-version-release.architecture.rpmmypackage-1.0.0-1.x86_64.rpmmypackage-1.0.0-2.el8.aarch64.rpm
# Alpine: package-version-release.apkmypackage-1.0.0-r0.apkmypackage-1.0.0-r1.apk
# OPKG: package_version_architecture.ipkmypackage_1.0.0_mips.ipkmypackage_1.0.0_arm.ipkRepository Organization
Organize repositories by distribution and version:
# Debian/debian/ubuntu-20.04/debian/ubuntu-22.04/debian/debian-11/debian/debian-12
# RPM/rpm/el7/rpm/el8/rpm/el9/rpm/fedora-38
# Alpine/alpine/v3.18/alpine/v3.19
# OPKG/opkg/openwrt-22.03/opkg/openwrt-23.05Package Metadata
Include comprehensive package metadata:
- Clear package descriptions
- Accurate dependency declarations
- Changelog entries
- Maintainer information
- License information
Testing Before Production
Always test packages in a staging environment:
# Use separate repositories for testing/debian/stable # Production/debian/testing # Pre-production testing/debian/unstable # Development buildsSee Also
- Repository Signing - Sign packages and repository metadata
- Access Control - Control who can publish and download packages
- Retention Policies - Automatically clean up old package versions
- Monitoring - Track repository usage and download metrics