简体   繁体   中英

How to add the Fluent Bit repository to Artifactory?

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 https://docs.fluentbit.io/manual/installation/linux/ubuntu .

So basically:

  • Import the GPG key
  • Create a /etc/apt/sources.list.d/fluent-bit.list file
  • Install the package

If you go to the repository URL https://packages.fluentbit.io/ubuntu/bionic/ in your browser, you will get a 403 forbidden error. Normally you can browse repositories.

Artifactory fluent-bit-bionic 存储库

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM