Debian Package Registry
Prerequisites
- Obtain a GitFlic transport token:
Transport Token Guide - Replace
{gitflic_domain}
with: - SaaS version:
registry.gitflic.ru
- Self-hosted:
localhost:8080
(port may vary)
Key Generation
Before uploading Debian packages, generate GPG key pairs for package signing:
1. Install GPG
Ubuntu/Debian:
sudo apt-get update && sudo apt-get install gnupg
macOS:
brew install gnupg
2. Generate Key Pair
gpg --full-generate-key
- Key type: ECC (default)
- Curve: Curve 25519 (default)
- Expiration: None (leave blank)
- Provide valid personal information
3. Export Keys
gpg --armor --export {your-key-id} > public-key.asc
gpg --armor --export-secret-keys {your-key-id} > private-key.asc
gpg --list-keys
4. Register Keys in GitFlic
- Navigate to Profile Settings → Keys → GPG Key Pairs
- Upload both public and private keys
- Select the key pair in Project/Company Settings → Registry Settings → Debian
Publishing Packages
Project-Level Publication
curl --user {userAlias}:{transportToken} \
--upload-file {pathToFile} \
{gitflic_domain}/project/{ownerAlias}/{projectAlias}/package/-/deb/pool/{Distribution}/{Component}/upload
curl --user user:aaaaaaaa-aaaa-aaaa-aaaa-cccccccccccc \
--upload-file test.deb \
http://localhost:8080/project/user/testproject/package/-/deb/pool/buster/main/upload
Company-Level Publication
curl --user {userAlias}:{transportToken} \
--upload-file {pathToFile} \
{gitflic_domain}/company/{companyAlias}/package/-/deb/pool/{Distribution}/{Component}/upload
curl --user user:aaaaaaaa-aaaa-aaaa-aaaa-cccccccccccc \
--upload-file test.deb \
http://localhost:8080/company/testcompany/package/-/deb/pool/buster/main/upload
Parameter | Description |
---|---|
Distribution |
Target OS version (e.g., buster ) |
Component |
Repository section (e.g., main ) |
Package Installation
1. Add Repository
Project repository:
echo "deb [signed-by=/etc/apt/keyrings/test.asc] http://localhost:8080/project/user/test/package/-/deb buster main" | sudo tee -a /etc/apt/sources.list
Company repository:
echo "deb [signed-by=/etc/apt/keyrings/test.asc] http://localhost:8080/company/testcompany/package/-/deb buster main" | sudo tee -a /etc/apt/sources.list
2. Import Public Key
Project key:
curl --user user:aaaaaaaa-aaaa-aaaa-aaaa-cccccccccccc \
http://localhost:8080/project/user/test/package/-/deb/dists/buster/public-key.asc \
-o /etc/apt/keyrings/test.asc
Company key:
curl --user user:aaaaaaaa-aaaa-aaaa-aaaa-cccccccccccc \
http://localhost:8080/company/testcompany/package/-/deb/dists/buster/public-key.asc \
-o /etc/apt/keyrings/test.asc
3. Configure Authentication (Optional)
echo "machine {gitflic_domain} login {userAlias} password {transportToken}" | sudo tee -a /etc/apt/auth.conf.d/gitflic.conf
4. Update & Install
sudo apt update
sudo apt install test/buster
Automatic translation!
This page has been automatically translated. The text may contain inaccuracies