ARTIFACTORY: Configuring the APT Client for Debian Repositories on Ubuntu 24.04 and Later

ARTIFACTORY: Configuring the APT Client for Debian Repositories on Ubuntu 24.04 and Later

Products
Frog_Artifactory
Content Type
Use_Case
AuthorFullName__c
David Fareau
articleNumber
000006435
FirstPublishedDate
2025-05-07T07:07:49Z
lastModifiedDate
2025-05-06
VersionNumber
1
Introduction

Starting with Ubuntu 24.04, a change has been implemented in managing APT repositories. The system now utilizes the ‘deb822 .sources’ format, located in /etc/apt/sources.list.d/ (e.g., ubuntu.sources). This transition offers several advantages: improved readability, enhanced metadata support (such as per-repository signing and architecture control), and alignment with Debian's standard repository management practices.

Configuring an Artifactory APT Repository


To configure an Artifactory APT repository in the new format, create a file named artifactory.sources in the /etc/apt/sources.list.d/ directory. This differs from the older .list format.


Example Configuration (artifactory.sources)
# /etc/apt/sources.list.d/artifactory.sources

Types: deb
URIs:https://davidf:<Token>@<Artifactory-URL>/artifactory/davidfa-debian
Suites: focal
Components: main multiverse 
Trusted: yes
## (Alternatively, to use the signature, replace it with this:) Signed-By: /etc/apt/keyrings/artifactory-pub.gpg

Explanation of Configuration Fields

Types: deb: Specifies that this is a binary package repository.
Trusted: yes: Instructs APT to bypass GPG signature verification for this specific repository. 
URIs: https://<Artifactory-URL>/artifactory/davidfa-debian: The base URL for the repository. Replace placeholders like <Token> and <Artifactory-URL> with your actual values.
Suites: focal: Indicates the distribution name (in this case, "focal").
Components: main multiverse: Lists the repository components.
Signed-By: /etc/apt/keyrings/artifactory-pub.gpg: Specifies the path to the GPG key used to verify the repository. This is the recommended approach for secure repository management.


After creating or editing the artifactory.sources file, run the following command to update APT's package list:
sudo apt update
This command fetches and indexes the packages from the newly configured source.

Backward Compatibility

The old .list format is still fully compatible and can be used alongside the new .sources format during the migration, with apt update automatically processing both formats without any additional configuration needed. This change brings better clarity, security with per-repo key management, and support for future features while maintaining backward compatibility.