Home > Blockchain >  How to add the Fluent Bit repository to Artifactory?
How to add the Fluent Bit repository to Artifactory?

Time:01-12

I'm trying to add the Fluent Bit repository to Artifactory, but I can't get it to work.

This page describes the steps to setup the repository on Ubuntu Artifactory fluent-bit-bionic repository

In Artifactory I created a remote repository of type "debian" and set the URL to https://packages.fluentbit.io/ubuntu/bionic. When I click on the Test button, I get the message "Connection failed: Target remote URL returned error 403: Forbidden". When I try to browse the repository inside Artifactory I see nothing. So that seems to be consistent with manual / native browsing.

Obviously the Ubuntu apt-get command works if the GPG key is imported first. But how can I make this GPG key available to Artifactory? I only see the page "Keys Management -> Signing Keys", but that is for signing custom packages and requires both a private and public key.

CodePudding user response:

The Fluent Bit repository just has directory listing disabled, so browsing it is not possible. Clicking the Test button in Artifactory gives a 403 forbidden error, but in this case that means a successful connection.

Artifactory is just a mirror, so the GPG key must be imported on the actual VM that points to Artifactory.

curl https://packages.fluentbit.io/fluentbit.key | gpg --dearmor > /usr/share/keyrings/fluentbit-keyring.gpg

Create a /etc/apt/sources.list.d/fluent-bit.list file:

deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] http://mydomain.example/artifactory/fluent-bit-bionic/ bionic main

After that the following commands just work:

apt-get update
apt-get install fluent-bit

All the files that apt-get resolved are now visible / browsable in fluent-bit-bionic and fluent-bit-bionic-cache at Artifactory.

  • Related