ARTIFACTORY: How to configure Hashicorp Debian Registry in Artifactory
In this article, we can see how to configure Hashicorp’s official Linux repository with Artifactory. The registry URL for this Linux registry will be https://apt.releases.hashicorp.com/
Please find the below steps to set up a repository using the above registry in Artifactory :
1. Create a new Debian repository in Artifactory using the Quick Repository Creation and set the remote registry URL as “https://apt.releases.hashicorp.com/”
2. Now, on your Debian client, kindly add the below source to the sources.list file which is located under /etc/apt.
deb [trusted=yes] https://<USERNAME>:<PASSWORD>@artifactory.com/artifactory/hashicorp-debian-remote <DISTRIBUTION> <COMPONENTS>
You can get the distribution and component details of your Debian client using the “lsb_release -cs” command.
3. After adding the source to the debian client, we need to download the GPG key of the Hashicorp Linux Repository and verify the GPG’s key fingerprint. You can use the below command to download the signing key to a new keyring in your debian client.
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
4. Next, you can use the following command to verify the GPG’s key fingerprint. For more information regarding this, you can visit Hashicorp’s official documentation.
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
5. Finally, after verifying the GPG keys, you can perform an “apt update” and then install any package from the Hashicorp Linux Repository.
Example:
# sudo apt install consul Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libatasmart4 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2 libblockdev-part2 libblockdev-swap2 libblockdev-utils2 libblockdev2 libmbim-glib4 libmbim-proxy libmm-glib0 libnspr4 libnss3 libnuma1 libparted-fs-resize0 libqmi-glib5 libqmi-proxy libudisks2-0 libxmlb2 usb-modeswitch usb-modeswitch-data Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: consul 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 63.3 MB of archives. After this operation, 164 MB of additional disk space will be used. Get:1 https://artifactory.com/artifactory/test-debian jammy/main amd64 consul amd64 1.16.2-1 [63.3 MB] Fetched 63.3 MB in 11s (5770 kB/s) Selecting previously unselected package consul. (Reading database ... 106485 files and directories currently installed.) Preparing to unpack .../consul_1.16.2-1_amd64.deb ... Unpacking consul (1.16.2-1) ... Setting up consul (1.16.2-1) ...